net.exe утверждает, что не работает во время отладки vscode, но фактически запускает [duplicate]

Просто потому, что все были так полезны, я просто добавлю изменения в красивые решения Zelazny7 и Daniele. Это для python 2.7, с вкладками, чтобы сделать его более читаемым:

def get_code(tree, feature_names, tabdepth=0):
    left      = tree.tree_.children_left
    right     = tree.tree_.children_right
    threshold = tree.tree_.threshold
    features  = [feature_names[i] for i in tree.tree_.feature]
    value = tree.tree_.value

    def recurse(left, right, threshold, features, node, tabdepth=0):
            if (threshold[node] != -2):
                    print '\t' * tabdepth,
                    print "if ( " + features[node] + " <= " + str(threshold[node]) + " ) {"
                    if left[node] != -1:
                            recurse (left, right, threshold, features,left[node], tabdepth+1)
                    print '\t' * tabdepth,
                    print "} else {"
                    if right[node] != -1:
                            recurse (left, right, threshold, features,right[node], tabdepth+1)
                    print '\t' * tabdepth,
                    print "}"
            else:
                    print '\t' * tabdepth,
                    print "return " + str(value[node])

    recurse(left, right, threshold, features, 0)
5
задан rok 30 November 2015 в 18:55
поделиться

1 ответ

Решено, app.config содержит несоответствие значений из настроек. setting, рестарт VS2013 решен, спрашивая, что делать с несоответствиями.

6
ответ дан rok 26 August 2018 в 21:32
поделиться
Другие вопросы по тегам:

Похожие вопросы: