classifiers logisticregression ( = )gaussiannb (da lineardiscriminantanalysis (da quadraticdiscriminantanalysis (kneighborsclassifier n_neighbors = svckernel ='rbf 'gamma - )print ('name accuracy \ '+ '-'for name clf in zip(names classifiers )clf fit(x_train y_train y_pred clf predict x_test print ('{: {: }format (name accuracy_score (y_test y_pred ))name accuracy logit nbayes lda qda knn svm further reading an excellent source for understanding various pattern recognition techniques is the book [ by duda et al theoretical foundations of classificationincluding the vapnikchernovenkis dimension and the fundamental theorem of learningare discussed in [ popular measure for characterizing the performance of binary classifier is the receiver operating characteristic (roccurve [ the naive bayes classification paradigm can be extended to handle explanatory variable dependency via graphical models such as bayesian networks and markov random fields [ for detailed discussion on bayesian decision theorysee [ exercises let show that the solution to the convex optimization problem min ,pn subject ton- - = pi and ( pi = is given by pi /( ) and pn derive the formulas ( by minimizing the cross-entropy training lossn ln (xi yi th) =