In [1]:
import math
import random
import copy
import sys, os
import tree
import Queue
In [2]:
def evaluate(x, formula):
    local = x
    print "local is: ", local
    print "formula is: ",formula
    ret = eval(formula)
    print "ret is ", ret
    return ret
In [3]:
goodbad = [True, False]
alltestssofar = []
numtests = 10
initialexperiments = []
fileicareabout = open("summary.txt","r")
text = fileicareabout.readlines()
fileicareabout.close()
workflow = text[0]

if (workflow != "null\n"):
    script,func = (workflow[:-1]).split(",")
    workflow = getattr(__import__(script), func)
else:
    workflow = None
formula = text[1]
cols = text[2][:-1].split(",")
alllines = text[3:]

allexperiments = []
allresults = [] # experiments and their results
believeddecisive = []
In [4]:
moreexperiments = []
for e in alllines:
    exp = (e[:-1]).split(",")
    moreexperiments.append(exp)
for i in range(len(moreexperiments) / 10):
    exp = random.choice(moreexperiments)
    allexperiments.append(exp)
    initialexperiments.append(exp)

rets=[]
In [5]:
for e in initialexperiments:
    x = copy.deepcopy(e)
    x[-1] = evaluate(e, formula)
    allresults.append(x)

print "allresults is: ", allresults
local is:  ['Higher_res', 'Features_all', 'adaboost', '1', '0.47703180212']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Lower_res', 'Features_tonal', 'logistic_regression', '0', '0.459363957597']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Lower_res', 'Features_all', 'svm', '1', '0.613074204947']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_lowlevel', 'svm', '0', '0.600706713781']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Lower_res', 'Features_tonal', 'random_forest', '0', '0.418727915194']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Lower_res', 'Features_selected_all', 'random_forest', '0', '0.508833922261']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_all', 'logistic_regression', '0', '0.583038869258']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_all', 'adaboost', '1', '0.47703180212']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Default', 'Features_rhythm', 'adaboost', '1', '0.432862190813']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Higher_res', 'Features_selected_all', 'random_forest', '0', '0.554770318021']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_selected_all', 'decisiontree', '1', '0.416961130742']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Lower_res', 'Features_lowlevel', 'logistic_regression', '0', '0.627208480565']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_tonal', 'svm', '0', '0.416961130742']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Lower_res', 'Features_selected_all', 'logistic_regression', '0', '0.625441696113']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_selected_all', 'decisiontree', '1', '0.416961130742']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Default', 'Features_lowlevel', 'svm', '0', '0.583038869258']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_rhythm', 'logistic_regression', '1', '0.418727915194']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Higher_res', 'Features_rhythm', 'decisiontree', '0', '0.424028268551']
formula is:  (local[4]>'0.5')

ret is  False
allresults is:  [['Higher_res', 'Features_all', 'adaboost', '1', False], ['Lower_res', 'Features_tonal', 'logistic_regression', '0', False], ['Lower_res', 'Features_all', 'svm', '1', True], ['Higher_res', 'Features_lowlevel', 'svm', '0', True], ['Lower_res', 'Features_tonal', 'random_forest', '0', False], ['Lower_res', 'Features_selected_all', 'random_forest', '0', True], ['Higher_res', 'Features_all', 'logistic_regression', '0', True], ['Higher_res', 'Features_all', 'adaboost', '1', False], ['Default', 'Features_rhythm', 'adaboost', '1', False], ['Higher_res', 'Features_selected_all', 'random_forest', '0', True], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', False], ['Lower_res', 'Features_lowlevel', 'logistic_regression', '0', True], ['Higher_res', 'Features_tonal', 'svm', '0', False], ['Lower_res', 'Features_selected_all', 'logistic_regression', '0', True], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', False], ['Default', 'Features_lowlevel', 'svm', '0', True], ['Higher_res', 'Features_rhythm', 'logistic_regression', '1', False], ['Higher_res', 'Features_rhythm', 'decisiontree', '0', False]]

Now the let's use the decision tree

In [6]:
def determinenodepurity(node, path):
    print "path is: ", path
    if node.results is None:
        pathfalse = copy.deepcopy(path)
        pathfalse.append((node.col,node.value,False))
        path.append((node.col,node.value,True))
        determinenodepurity(node.fb,pathfalse)
        determinenodepurity(node.tb,path)
    elif (len(node.results.items())>1):
        mixedlist.append(path)
    elif(node.results.items()[0][0]):
        puregoodlist.append(path)
    else:
        purebadlist.append(path)
        
def findshoertestpaths(node):
    q = Queue.Queue()
    q.put((node,[]))
    puregoodpath = None
    purebadpath = None
    while (not q.empty()) and ((puregoodpath is None) or (purebadpath is None)):
        current = q.get()
        if current[0].results is None:
            q.put((current[0].fb,current[1]+[(current[0].col,current[0].value,False)]))
            q.put((current[0].tb,current[1]+[(current[0].col,current[0].value,True)]))
        elif (len(current[0].results.items())>1):
            continue
        elif(current[0].results.items()[0][0]) and (puregoodpath is None):
            puregoodpath = current[1]
        elif (not current[0].results.items()[0][0]) and (purebadpath is None):
            purebadpath = current[1]
    return [puregoodpath, purebadpath]
In [7]:
def manufacturetests(moralflag, alist):
    global believeddecisive
    rebuild = False; 
    print "a list: ", alist
    if (moralflag == 'bad'):
        for path in alist:
            print "at step 2.5, path: ", path
            z = assembletests('bad', path)
            if z: 
                print "believeddecisive for bad: ",path
            else:
                rebuild = True
     
    if (moralflag == 'good'):
        for path in alist:
            print "at step 3.5, path: ", path
            z = assembletests('good', path)
            if z: 
                print "believeddecisive for good: ",path
            else:
                rebuild = True
    return rebuild
    
    
def assembletests(moralflag, path):
    global believeddecisive
    outlist = []
    myarrtrans = zip(*allexperiments)
    
    
    for j in range(len(cols) - 1):
        y = set(myarrtrans[j])
        print "y is: ", y
        for index,value,flag in [tup for tup in path if tup[0] == j]:
            if flag:
                y = {value}
            else:
                y = y - {value}
        outlist.append(list(y))
            
            
   
    print "in assembletests, outlist is: ", outlist
    # Now just choose random values from these lists to generate experiments
    experiments = []
    for i in range(numtests):
        x = []
        for mylist in outlist:
            x.append(random.choice(mylist))
        length = len(x)
        for e in moreexperiments:
            if x == e[:-1]:
                x = copy.deepcopy(e)
        if (x not in allexperiments) and (x not in experiments) and (len(x) == length + 1):
            print("retrieved experiment: ", x)
            experiments.append(x)
        elif (workflow) and (len(x) == length):
            print("called workflow")
            x = workflow(x) 
            experiments.append(x)
        else:
            print "experiment already seen: ", x
          
    print "experiments are: ", experiments
    # simulate this just for experiments
    # then if you get the answer you expect every time, then modify believeddecisive
    # try experiments in the simulator and evaluate
    # FOLLOWING LOOP PMUST CHANGE WHEN WE GO AWAY FROM SIMULATION
    # RESULTS MUST BE READ BACK INTO allrets AND allresults SHOULD BE APPENDED TO
    # BECAUSE allresults HAS THE RESULTS OF ALL EXPERIMENTS
    for e in experiments:
        # use experiments as long as labels so far are unambiguous
        allexperiments.append(e)
        x = copy.deepcopy(e)
        x[-1] = (evaluate(e, formula))
        allresults.append(x)
        if ((moralflag == 'good') and (x[-1] == goodbad[1])) or ((moralflag == 'bad') and (x[-1] == goodbad[0])) :
            return False
    return True
In [8]:
rebuild = True
while rebuild:
    rebuild = False
    print "allresults is: ", allresults
    print "allexperiments are: ", allexperiments
    t = tree.build(allresults, cols=cols)
    tree.draw_tree(t)
    #puregoodlist = []
    #purebadlist = []
    #mixedlist = []
    goodpath, badpath = findshoertestpaths(t)
    rebuild = rebuild or manufacturetests('good', [goodpath])
    rebuild = rebuild or manufacturetests('bad', [badpath])
    print len(allexperiments), "experiments so far"
    
   
   
allresults is:  [['Higher_res', 'Features_all', 'adaboost', '1', False], ['Lower_res', 'Features_tonal', 'logistic_regression', '0', False], ['Lower_res', 'Features_all', 'svm', '1', True], ['Higher_res', 'Features_lowlevel', 'svm', '0', True], ['Lower_res', 'Features_tonal', 'random_forest', '0', False], ['Lower_res', 'Features_selected_all', 'random_forest', '0', True], ['Higher_res', 'Features_all', 'logistic_regression', '0', True], ['Higher_res', 'Features_all', 'adaboost', '1', False], ['Default', 'Features_rhythm', 'adaboost', '1', False], ['Higher_res', 'Features_selected_all', 'random_forest', '0', True], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', False], ['Lower_res', 'Features_lowlevel', 'logistic_regression', '0', True], ['Higher_res', 'Features_tonal', 'svm', '0', False], ['Lower_res', 'Features_selected_all', 'logistic_regression', '0', True], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', False], ['Default', 'Features_lowlevel', 'svm', '0', True], ['Higher_res', 'Features_rhythm', 'logistic_regression', '1', False], ['Higher_res', 'Features_rhythm', 'decisiontree', '0', False]]
allexperiments are:  [['Higher_res', 'Features_all', 'adaboost', '1', '0.47703180212'], ['Lower_res', 'Features_tonal', 'logistic_regression', '0', '0.459363957597'], ['Lower_res', 'Features_all', 'svm', '1', '0.613074204947'], ['Higher_res', 'Features_lowlevel', 'svm', '0', '0.600706713781'], ['Lower_res', 'Features_tonal', 'random_forest', '0', '0.418727915194'], ['Lower_res', 'Features_selected_all', 'random_forest', '0', '0.508833922261'], ['Higher_res', 'Features_all', 'logistic_regression', '0', '0.583038869258'], ['Higher_res', 'Features_all', 'adaboost', '1', '0.47703180212'], ['Default', 'Features_rhythm', 'adaboost', '1', '0.432862190813'], ['Higher_res', 'Features_selected_all', 'random_forest', '0', '0.554770318021'], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', '0.416961130742'], ['Lower_res', 'Features_lowlevel', 'logistic_regression', '0', '0.627208480565'], ['Higher_res', 'Features_tonal', 'svm', '0', '0.416961130742'], ['Lower_res', 'Features_selected_all', 'logistic_regression', '0', '0.625441696113'], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', '0.416961130742'], ['Default', 'Features_lowlevel', 'svm', '0', '0.583038869258'], ['Higher_res', 'Features_rhythm', 'logistic_regression', '1', '0.418727915194'], ['Higher_res', 'Features_rhythm', 'decisiontree', '0', '0.424028268551']]
a list:  [[(1, 'Features_lowlevel', True)]]
at step 3.5, path:  [(1, 'Features_lowlevel', True)]
y is:  set(['Default', 'Lower_res', 'Higher_res'])
y is:  set(['Features_lowlevel', 'Features_rhythm', 'Features_all', 'Features_tonal', 'Features_selected_all'])
y is:  set(['logistic_regression', 'decisiontree', 'svm', 'adaboost', 'random_forest'])
y is:  set(['1', '0'])
in assembletests, outlist is:  [['Default', 'Lower_res', 'Higher_res'], ['Features_lowlevel'], ['logistic_regression', 'decisiontree', 'svm', 'adaboost', 'random_forest'], ['1', '0']]
retrieved experiment
retrieved experiment
retrieved experiment
retrieved experiment
retrieved experiment
retrieved experiment
retrieved experiment
experiment already seen:  ['Higher_res', 'Features_lowlevel', 'svm', '0', '0.600706713781']
experiment already seen:  ['Lower_res', 'Features_lowlevel', 'logistic_regression', '1', '0.591872791519']
retrieved experiment
experiments are:  [['Lower_res', 'Features_lowlevel', 'adaboost', '1', '0.503533568905'], ['Higher_res', 'Features_lowlevel', 'decisiontree', '0', '0.47703180212'], ['Lower_res', 'Features_lowlevel', 'decisiontree', '1', '0.457597173145'], ['Higher_res', 'Features_lowlevel', 'svm', '1', '0.598939929329'], ['Default', 'Features_lowlevel', 'logistic_regression', '1', '0.595406360424'], ['Lower_res', 'Features_lowlevel', 'logistic_regression', '1', '0.591872791519'], ['Higher_res', 'Features_lowlevel', 'adaboost', '0', '0.531802120141'], ['Default', 'Features_lowlevel', 'decisiontree', '1', '0.418727915194']]
local is:  ['Lower_res', 'Features_lowlevel', 'adaboost', '1', '0.503533568905']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_lowlevel', 'decisiontree', '0', '0.47703180212']
formula is:  (local[4]>'0.5')

ret is  False
20 experiments so far
allresults is:  [['Higher_res', 'Features_all', 'adaboost', '1', False], ['Lower_res', 'Features_tonal', 'logistic_regression', '0', False], ['Lower_res', 'Features_all', 'svm', '1', True], ['Higher_res', 'Features_lowlevel', 'svm', '0', True], ['Lower_res', 'Features_tonal', 'random_forest', '0', False], ['Lower_res', 'Features_selected_all', 'random_forest', '0', True], ['Higher_res', 'Features_all', 'logistic_regression', '0', True], ['Higher_res', 'Features_all', 'adaboost', '1', False], ['Default', 'Features_rhythm', 'adaboost', '1', False], ['Higher_res', 'Features_selected_all', 'random_forest', '0', True], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', False], ['Lower_res', 'Features_lowlevel', 'logistic_regression', '0', True], ['Higher_res', 'Features_tonal', 'svm', '0', False], ['Lower_res', 'Features_selected_all', 'logistic_regression', '0', True], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', False], ['Default', 'Features_lowlevel', 'svm', '0', True], ['Higher_res', 'Features_rhythm', 'logistic_regression', '1', False], ['Higher_res', 'Features_rhythm', 'decisiontree', '0', False], ['Lower_res', 'Features_lowlevel', 'adaboost', '1', True], ['Higher_res', 'Features_lowlevel', 'decisiontree', '0', False]]
allexperiments are:  [['Higher_res', 'Features_all', 'adaboost', '1', '0.47703180212'], ['Lower_res', 'Features_tonal', 'logistic_regression', '0', '0.459363957597'], ['Lower_res', 'Features_all', 'svm', '1', '0.613074204947'], ['Higher_res', 'Features_lowlevel', 'svm', '0', '0.600706713781'], ['Lower_res', 'Features_tonal', 'random_forest', '0', '0.418727915194'], ['Lower_res', 'Features_selected_all', 'random_forest', '0', '0.508833922261'], ['Higher_res', 'Features_all', 'logistic_regression', '0', '0.583038869258'], ['Higher_res', 'Features_all', 'adaboost', '1', '0.47703180212'], ['Default', 'Features_rhythm', 'adaboost', '1', '0.432862190813'], ['Higher_res', 'Features_selected_all', 'random_forest', '0', '0.554770318021'], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', '0.416961130742'], ['Lower_res', 'Features_lowlevel', 'logistic_regression', '0', '0.627208480565'], ['Higher_res', 'Features_tonal', 'svm', '0', '0.416961130742'], ['Lower_res', 'Features_selected_all', 'logistic_regression', '0', '0.625441696113'], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', '0.416961130742'], ['Default', 'Features_lowlevel', 'svm', '0', '0.583038869258'], ['Higher_res', 'Features_rhythm', 'logistic_regression', '1', '0.418727915194'], ['Higher_res', 'Features_rhythm', 'decisiontree', '0', '0.424028268551'], ['Lower_res', 'Features_lowlevel', 'adaboost', '1', '0.503533568905'], ['Higher_res', 'Features_lowlevel', 'decisiontree', '0', '0.47703180212']]
a list:  [[(2, 'decisiontree', False), (1, 'Features_tonal', False), (3, '1', False)]]
at step 3.5, path:  [(2, 'decisiontree', False), (1, 'Features_tonal', False), (3, '1', False)]
y is:  set(['Default', 'Lower_res', 'Higher_res'])
y is:  set(['Features_lowlevel', 'Features_rhythm', 'Features_all', 'Features_tonal', 'Features_selected_all'])
y is:  set(['logistic_regression', 'decisiontree', 'svm', 'adaboost', 'random_forest'])
y is:  set(['1', '0'])
in assembletests, outlist is:  [['Default', 'Lower_res', 'Higher_res'], ['Features_lowlevel', 'Features_all', 'Features_selected_all', 'Features_rhythm'], ['logistic_regression', 'svm', 'adaboost', 'random_forest'], ['0']]
experiment already seen:  ['Higher_res', 'Features_lowlevel', 'svm', '0', '0.600706713781']
retrieved experiment
retrieved experiment
retrieved experiment
experiment already seen:  ['Default', 'Features_lowlevel', 'svm', '0', '0.583038869258']
retrieved experiment
experiment already seen:  ['Higher_res', 'Features_all', 'logistic_regression', '0', '0.583038869258']
retrieved experiment
retrieved experiment
experiment already seen:  ['Default', 'Features_all', 'adaboost', '0', '0.519434628975']
experiments are:  [['Lower_res', 'Features_selected_all', 'adaboost', '0', '0.494699646643'], ['Default', 'Features_rhythm', 'logistic_regression', '0', '0.507067137809'], ['Higher_res', 'Features_lowlevel', 'adaboost', '0', '0.531802120141'], ['Default', 'Features_selected_all', 'logistic_regression', '0', '0.600706713781'], ['Higher_res', 'Features_selected_all', 'logistic_regression', '0', '0.597173144876'], ['Default', 'Features_all', 'adaboost', '0', '0.519434628975']]
local is:  ['Lower_res', 'Features_selected_all', 'adaboost', '0', '0.494699646643']
formula is:  (local[4]>'0.5')

ret is  False
21 experiments so far
allresults is:  [['Higher_res', 'Features_all', 'adaboost', '1', False], ['Lower_res', 'Features_tonal', 'logistic_regression', '0', False], ['Lower_res', 'Features_all', 'svm', '1', True], ['Higher_res', 'Features_lowlevel', 'svm', '0', True], ['Lower_res', 'Features_tonal', 'random_forest', '0', False], ['Lower_res', 'Features_selected_all', 'random_forest', '0', True], ['Higher_res', 'Features_all', 'logistic_regression', '0', True], ['Higher_res', 'Features_all', 'adaboost', '1', False], ['Default', 'Features_rhythm', 'adaboost', '1', False], ['Higher_res', 'Features_selected_all', 'random_forest', '0', True], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', False], ['Lower_res', 'Features_lowlevel', 'logistic_regression', '0', True], ['Higher_res', 'Features_tonal', 'svm', '0', False], ['Lower_res', 'Features_selected_all', 'logistic_regression', '0', True], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', False], ['Default', 'Features_lowlevel', 'svm', '0', True], ['Higher_res', 'Features_rhythm', 'logistic_regression', '1', False], ['Higher_res', 'Features_rhythm', 'decisiontree', '0', False], ['Lower_res', 'Features_lowlevel', 'adaboost', '1', True], ['Higher_res', 'Features_lowlevel', 'decisiontree', '0', False], ['Lower_res', 'Features_selected_all', 'adaboost', '0', False]]
allexperiments are:  [['Higher_res', 'Features_all', 'adaboost', '1', '0.47703180212'], ['Lower_res', 'Features_tonal', 'logistic_regression', '0', '0.459363957597'], ['Lower_res', 'Features_all', 'svm', '1', '0.613074204947'], ['Higher_res', 'Features_lowlevel', 'svm', '0', '0.600706713781'], ['Lower_res', 'Features_tonal', 'random_forest', '0', '0.418727915194'], ['Lower_res', 'Features_selected_all', 'random_forest', '0', '0.508833922261'], ['Higher_res', 'Features_all', 'logistic_regression', '0', '0.583038869258'], ['Higher_res', 'Features_all', 'adaboost', '1', '0.47703180212'], ['Default', 'Features_rhythm', 'adaboost', '1', '0.432862190813'], ['Higher_res', 'Features_selected_all', 'random_forest', '0', '0.554770318021'], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', '0.416961130742'], ['Lower_res', 'Features_lowlevel', 'logistic_regression', '0', '0.627208480565'], ['Higher_res', 'Features_tonal', 'svm', '0', '0.416961130742'], ['Lower_res', 'Features_selected_all', 'logistic_regression', '0', '0.625441696113'], ['Higher_res', 'Features_selected_all', 'decisiontree', '1', '0.416961130742'], ['Default', 'Features_lowlevel', 'svm', '0', '0.583038869258'], ['Higher_res', 'Features_rhythm', 'logistic_regression', '1', '0.418727915194'], ['Higher_res', 'Features_rhythm', 'decisiontree', '0', '0.424028268551'], ['Lower_res', 'Features_lowlevel', 'adaboost', '1', '0.503533568905'], ['Higher_res', 'Features_lowlevel', 'decisiontree', '0', '0.47703180212'], ['Lower_res', 'Features_selected_all', 'adaboost', '0', '0.494699646643']]
a list:  [[(2, 'decisiontree', False), (1, 'Features_lowlevel', True)]]
at step 3.5, path:  [(2, 'decisiontree', False), (1, 'Features_lowlevel', True)]
y is:  set(['Default', 'Lower_res', 'Higher_res'])
y is:  set(['Features_lowlevel', 'Features_rhythm', 'Features_all', 'Features_tonal', 'Features_selected_all'])
y is:  set(['logistic_regression', 'decisiontree', 'svm', 'adaboost', 'random_forest'])
y is:  set(['1', '0'])
in assembletests, outlist is:  [['Default', 'Lower_res', 'Higher_res'], ['Features_lowlevel'], ['logistic_regression', 'svm', 'adaboost', 'random_forest'], ['1', '0']]
retrieved experiment
retrieved experiment
experiment already seen:  ['Higher_res', 'Features_lowlevel', 'logistic_regression', '1', '0.583038869258']
experiment already seen:  ['Lower_res', 'Features_lowlevel', 'logistic_regression', '0', '0.627208480565']
retrieved experiment
retrieved experiment
retrieved experiment
retrieved experiment
retrieved experiment
experiment already seen:  ['Higher_res', 'Features_lowlevel', 'logistic_regression', '0', '0.613074204947']
experiments are:  [['Lower_res', 'Features_lowlevel', 'random_forest', '1', '0.565371024735'], ['Higher_res', 'Features_lowlevel', 'logistic_regression', '1', '0.583038869258'], ['Higher_res', 'Features_lowlevel', 'logistic_regression', '0', '0.613074204947'], ['Default', 'Features_lowlevel', 'random_forest', '0', '0.56183745583'], ['Higher_res', 'Features_lowlevel', 'svm', '1', '0.598939929329'], ['Default', 'Features_lowlevel', 'adaboost', '0', '0.508833922261'], ['Default', 'Features_lowlevel', 'svm', '1', '0.597173144876']]
local is:  ['Lower_res', 'Features_lowlevel', 'random_forest', '1', '0.565371024735']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_lowlevel', 'logistic_regression', '1', '0.583038869258']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_lowlevel', 'logistic_regression', '0', '0.613074204947']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Default', 'Features_lowlevel', 'random_forest', '0', '0.56183745583']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Higher_res', 'Features_lowlevel', 'svm', '1', '0.598939929329']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Default', 'Features_lowlevel', 'adaboost', '0', '0.508833922261']
formula is:  (local[4]>'0.5')

ret is  True
local is:  ['Default', 'Features_lowlevel', 'svm', '1', '0.597173144876']
formula is:  (local[4]>'0.5')

ret is  True
believeddecisive for good:  [(2, 'decisiontree', False), (1, 'Features_lowlevel', True)]
a list:  [[(2, 'decisiontree', True)]]
at step 2.5, path:  [(2, 'decisiontree', True)]
y is:  set(['Default', 'Lower_res', 'Higher_res'])
y is:  set(['Features_lowlevel', 'Features_rhythm', 'Features_all', 'Features_tonal', 'Features_selected_all'])
y is:  set(['logistic_regression', 'decisiontree', 'svm', 'adaboost', 'random_forest'])
y is:  set(['1', '0'])
in assembletests, outlist is:  [['Default', 'Lower_res', 'Higher_res'], ['Features_lowlevel', 'Features_rhythm', 'Features_all', 'Features_tonal', 'Features_selected_all'], ['decisiontree'], ['1', '0']]
retrieved experiment
retrieved experiment
experiment already seen:  ['Higher_res', 'Features_lowlevel', 'decisiontree', '0', '0.47703180212']
experiment already seen:  ['Higher_res', 'Features_lowlevel', 'decisiontree', '0', '0.47703180212']
retrieved experiment
retrieved experiment
retrieved experiment
retrieved experiment
retrieved experiment
retrieved experiment
experiments are:  [['Lower_res', 'Features_all', 'decisiontree', '0', '0.432862190813'], ['Default', 'Features_tonal', 'decisiontree', '0', '0.372791519435'], ['Higher_res', 'Features_rhythm', 'decisiontree', '1', '0.388692579505'], ['Higher_res', 'Features_lowlevel', 'decisiontree', '1', '0.469964664311'], ['Lower_res', 'Features_tonal', 'decisiontree', '0', '0.374558303887'], ['Lower_res', 'Features_lowlevel', 'decisiontree', '0', '0.471731448763'], ['Higher_res', 'Features_selected_all', 'decisiontree', '0', '0.422261484099'], ['Default', 'Features_rhythm', 'decisiontree', '1', '0.342756183746']]
local is:  ['Lower_res', 'Features_all', 'decisiontree', '0', '0.432862190813']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Default', 'Features_tonal', 'decisiontree', '0', '0.372791519435']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Higher_res', 'Features_rhythm', 'decisiontree', '1', '0.388692579505']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Higher_res', 'Features_lowlevel', 'decisiontree', '1', '0.469964664311']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Lower_res', 'Features_tonal', 'decisiontree', '0', '0.374558303887']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Lower_res', 'Features_lowlevel', 'decisiontree', '0', '0.471731448763']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Higher_res', 'Features_selected_all', 'decisiontree', '0', '0.422261484099']
formula is:  (local[4]>'0.5')

ret is  False
local is:  ['Default', 'Features_rhythm', 'decisiontree', '1', '0.342756183746']
formula is:  (local[4]>'0.5')

ret is  False
believeddecisive for bad:  [(2, 'decisiontree', True)]
36 experiments so far
In [ ]: