plot(neg[0,:], neg[1,:], "b.") grid(True) title('Data',size=10) # plot PRC for SVM subplot(223) PRC_evaluation=PRCEvaluation() PRC_evaluation.evaluate(svm.classify(),labels) PRC = PRC_evaluation.get_PRC() plot(PRC[:,0], PRC[:,1]) fill_between(PRC[:,0],PRC[:,1],0,alpha=0.1) text(0.55,mean(PRC[:,1])/3,'auPRC = %.5f' % PRC_evaluation.get_auPRC()) grid(True) xlabel('Precision') ylabel('Recall') title('LibSVM (Gaussian kernel, C=%.3f) PRC curve' % svm.get_C1(),size=10) # plot PRC for LDA subplot(224) PRC_evaluation.evaluate(lda.classify(),labels) PRC = PRC_evaluation.get_PRC() plot(PRC[:,0], PRC[:,1]) fill_between(PRC[:,0],PRC[:,1],0,alpha=0.1) text(0.55,mean(PRC[:,1])/3,'auPRC = %.5f' % PRC_evaluation.get_auPRC()) grid(True) xlabel('Precision') ylabel('Recall') title('LDA (gamma=%.3f) PRC curve' % lda.get_gamma(),size=10) connect('key_press_event', util.quit) show()