{'become' : '8', 'p' : 1}, {'become' : '9', 'p' : 1} ] } ge.startExpr = '<EXPR>' trainingSet = { 'header' : ['otsu', 'stdev', 'mean', 't', 'minOtsu'], 'target' : 't', 'data' : thresholdingData } ge.trainingSet = trainingSet ge.train() ge.printAllPhenotype() #good features should have correlation with the output (done), #good features should not be correlated each other bestPhenotype = ge.getBestPhenotype(5, 0) for phenotype in bestPhenotype: print(phenotype) all_extracted_features = [] all_original_features = [] all_targets = [] trainingHeader = trainingSet['header'] for trainingData in trainingSet['data']: sandbox = {} extracted_inputs = []
], '<DIGIT>' : [ {'become' : '<DIGIT><DIGIT>', 'p' : 1}, {'become' : '0', 'p' : 1}, {'become' : '1', 'p' : 1}, {'become' : '2', 'p' : 1}, {'become' : '3', 'p' : 1}, {'become' : '4', 'p' : 1}, {'become' : '5', 'p' : 1}, {'become' : '6', 'p' : 1}, {'become' : '7', 'p' : 1}, {'become' : '8', 'p' : 1}, {'become' : '9', 'p' : 1} ] } gfcs._trainingSet = { 'header' : ['otsu', 'stdev', 'mean', 'minOtsu', 't'], 'target' : 't', 'data' : thresholdingData } gfcs.train() gfcs.printAllPhenotype() best = gfcs.getBestPhenotype(10,0.0) trainingSet = {} trainingSet['target'] = gfcs._trainingSet['target'] trainingSet['header'] = [] trainingSet['data'] = [] for individu in best: print(individu)