Exemple #1
0
                        
    print "Final results :\n"
    pprint(EM_result)
    #for e in xrange(len(no_of_experts)):
    #    Utils.visualize( EM_result[e], min_class_label, max_class_label, no_of_experts[e] )   
    return EM_result
    

def test(test_data):
    print "Test data:"
    pprint (test_data)
    
    
#k_fold_cross_validation()
train(data, 0)
Utils.showPlot()
        
"""else:
            EM_perf = crowds_EM.predict_EM(crowds_EM.x, crowds_EM.y)
            print "EM perf ", EM_perf 
            EM_acc += EM_perf
            if EM_perf > EM_highest_performance['accuracy']:
                EM_highest_performance['accuracy'] = EM_perf
                EM_highest_performance['results'] = crowds_EM.results
                
            MV_acc += crowds_EM.predict_MV(crowds_EM.x, crowds_EM.y)
            #np.save('X.npy', crowds_EM.x)"""
 

"""print "No. of failed iterations : ", failed    
print "Average EM accuracy after ", iterations," iter : ", EM_acc/(total_iter-failed)