y_pred_lower_threshold svc decision_function(x_test let' look at the classification report for this predictionin[ ]print(classification_report(y_testy_pred_lower_threshold)out[ ]precision recall -score support avg total as expectedthe recall of class went upand the precision went down we are now classifying larger region of space as class as illustrated in the top-right panel of figure - if you value precision over recall or the other way aroundor your data is heavily imbalancedchanging the decision threshold is the easiest way to obtain better results as the decision_function can have arbitrary rangesit is hard to provide rule of thumb regarding how to pick threshold if you do set thresholdyou need to be careful not to do so using the test set as with any other parametersetting decision threshold on the test set is likely to yield overly optimistic results use validation set or cross-validation instead picking threshold for models that implement the predict_proba method can be easieras the output of predict_proba is on fixed to scaleand models probabilities by defaultthe threshold of means that if the model is more than "surethat point is of the positive classit will be classified as such increasing the threshold means that the model needs to be more confident to make positive decision (and less confident to make negative decisionwhile working with probabilities may be more intuitive than working with arbitrary thresholdsnot all models provide realistic models of uncertainty ( decisiontree that is grown to its full depth is always sure of its decisionseven though it might often be wrongthis relates to the concept of calibrationa calibrated model is model that provides an accurate measure of its uncertainty discussing calibration in detail is beyond the scope of this bookbut you can find more details in the paper "predicting good probabilities with supervised learningby alexandru niculescu-mizil and rich caruana model evaluation and improvement