data_tes_path = '/home/chengtao/june/data/svm_pos/tes' plot_roc.beg_plt() best = 0.00 best_hype = '' for sco in sorted(os.listdir(lstm_path)): if 'info' in sco: continue H = X_obj.SCO_obj(lstm_path+'/'+sco+'/score') auc,fpr,tpr = H.read_report() if auc > best: best = auc best_hype = sco #plot_roc.get_plt(auc,fpr,tpr,'lstm'+sco) H = X_obj.SCO_obj(logr_path+'/0.001/score') auc,fpr,tpr = H.read_report() plot_roc.get_plt(auc,fpr,tpr,'logr 0.001') H = X_obj.SCO_obj(lstm_path+'/'+best_hype+'/score') auc,fpr,tpr = H.read_report() plot_roc.get_plt(auc,fpr,tpr,'lstm 16_3_0.001') print best_hype plot_roc.sco_plt(data_dev_path+'/targets_utt.ark',data_dev_path+'/results_hmm.pkl','hmm: 1st stage') plot_roc.sco_plt(data_dev_path+'/targets_utt.ark',data_dev_path+'/results_svm.pkl','svm: 2nd stage') plot_roc.sco_plt(data_dev_path+'/targets_utt.ark',data_dev_path+'/results_cld.pkl','cloud operating point',True) plot_roc.end_plt('2015-1027-1145.png')
data_dev_path = '/home/chengtao/june/data/svm_pos/dev' data_tes_path = '/home/chengtao/june/data/svm_pos/tes' plot_roc.beg_plt() best = 0.00 best_hype = '' for sco in sorted(os.listdir(lstm_path)): if 'info' in sco: continue H = X_obj.SCO_obj(lstm_path+'/'+sco+'/score') auc,fpr,tpr = H.read_report() if auc > best: best = auc best_hype = sco #plot_roc.get_plt(auc,fpr,tpr,'lstm'+sco) H = X_obj.SCO_obj(logr_path+'/0.001/score') auc,fpr,tpr = H.read_report() plot_roc.get_plt(auc,fpr,tpr,'logr') H = X_obj.SCO_obj(lstm_path+'/'+best_hype+'/score') auc,fpr,tpr = H.read_report() plot_roc.get_plt(auc,fpr,tpr,'lstm') print best_hype plot_roc.sco_plt(data_dev_path+'/targets_utt.ark',data_dev_path+'/results_svm.pkl','svm') plot_roc.sco_plt(data_dev_path+'/targets_utt.ark',data_dev_path+'/results_hmm.pkl','hmm') plot_roc.sco_plt(data_dev_path+'/targets_utt.ark',data_dev_path+'/results_cld.pkl','cld',True) plot_roc.end_plt('scores.png')
data_dev_path = '/home/chengtao/june/data/svm_pos/dev' data_tes_path = '/home/chengtao/june/data/svm_pos/tes' plot_roc.beg_plt() best = 0.00 best_hype = '' for sco in sorted(os.listdir(lstm_path)): if 'info' in sco: continue if sys.argv[1] not in sco: continue H = X_obj.SCO_obj(lstm_path+'/'+sco+'/score') auc,fpr,tpr = H.read_report() if auc > best: best = auc best_hype = sco plot_roc.get_plt(auc,fpr,tpr,'lstm '+sco) #H = X_obj.SCO_obj(logr_path+'/0.001/score') #auc,fpr,tpr = H.read_report() #plot_roc.get_plt(auc,fpr,tpr,'logr 0.001') #H = X_obj.SCO_obj(lstm_path+'/'+best_hype+'/score') #auc,fpr,tpr = H.read_report() #plot_roc.get_plt(auc,fpr,tpr,'lstm 16_3_0.001') print best_hype #plot_roc.sco_plt(data_dev_path+'/targets_utt.ark',data_dev_path+'/results_hmm.pkl','hmm: 1st stage') #plot_roc.sco_plt(data_dev_path+'/targets_utt.ark',data_dev_path+'/results_svm.pkl','svm: 2nd stage') plot_roc.sco_plt(data_dev_path+'/targets_utt.ark',data_dev_path+'/results_cld.pkl','cloud operating point',True)
score_tra_path = "/home/chengtao/june/simple_exp/score/tra" score_tes_path = "/home/chengtao/june/simple_exp/score/tra" model_path = "/home/chengtao/june/simple_exp/model" data_tra_path = "/home/chengtao/june/data/beta/tra" data_tes_path = "/home/chengtao/june/data/beta/tes" plot_roc.beg_plt() best = 0.00 best_hype = "" for sco in sorted(os.listdir(lstm_path)): if "info" in sco: continue H = X_obj.SCO_obj(lstm_path + "/" + sco + "/score") auc, fpr, tpr = H.read_report() if auc > best: best = auc best_hype = sco # plot_roc.get_plt(auc,fpr,tpr,'lstm'+sco) H = X_obj.SCO_obj(logr_path + "/0.001/score") auc, fpr, tpr = H.read_report() plot_roc.get_plt(auc, fpr, tpr, "logr") H = X_obj.SCO_obj(lstm_path + "/" + best_hype + "/score") auc, fpr, tpr = H.read_report() plot_roc.get_plt(auc, fpr, tpr, "single layer lstm") plot_roc.end_plt("2015-1026-1811.png")
import X_obj import plot_roc import os import sys lstm_path = '/home/chengtao/june/hyper/lstm_negs' lstm2_path = '/home/chengtao/june/hyper/lstm' data_tra_path = '/home/chengtao/june/data/beta/tra' data_tes_path = '/home/chengtao/june/data/beta/tes' plot_roc.beg_plt() best_hype = '16_3_0.001' H = X_obj.SCO_obj(lstm_path+'/'+best_hype+'/score') auc,fpr,tpr = H.read_report() plot_roc.get_plt(auc,fpr,tpr,'lstm trained on negative, tested on positive') G = X_obj.SCO_obj(lstm_path+'/'+best_hype+'/score_dev') auc,fpr,tpr = G.read_report() plot_roc.get_plt(auc,fpr,tpr,'lstm trained on negative, tested on negative') I = X_obj.SCO_obj(lstm2_path+'/'+best_hype+'/score') auc,fpr,tpr = I.read_report() plot_roc.get_plt(auc,fpr,tpr,'lstm trained on positive, tested on positive') plot_roc.end_plt(sys.argv[0][:-3]+'.png')