models and very good model are not as clear any more picking which class is declared the positive class has big impact on the metrics while the -score for the dummy classification is (vs for the logistic regressionon the "nineclassfor the "not nineclass it is vs which both seem like reasonable results looking at all the numbers together paints pretty accurate picturethoughand we can clearly see the superiority of the logistic regression model taking uncertainty into account the confusion matrix and the classification report provide very detailed analysis of particular set of predictions howeverthe predictions themselves already threw away lot of information that is contained in the model as we discussed in chapter most classifiers provide decision_function or predict_proba method to assess degrees of certainty about predictions making predictions can be seen as thresholding the output of decision_function or predict_proba at certain fixed point--in binary classification we use for the decision function and for predict_proba the following is an example of an imbalanced binary classification taskwith points in the negative class classified against points in the positive class the training data is shown on the left in figure - we train kernel svm model on this dataand the plots to the right of the training data illustrate the values of the decision function as heat map you can see black circle in the plot in the top centerwhich denotes the threshold of the decision_function being exactly zero points inside this circle will be classified as the positive classand points outside as the negative classin[ ]from mglearn datasets import make_blobs xy make_blobs(n_samples=( )centers= cluster_std=[ ]random_state= x_trainx_testy_trainy_test train_test_split(xyrandom_state= svc svc(gamma fit(x_trainy_trainin[ ]mglearn plots plot_decision_threshold( model evaluation and improvement