framework precision manually computed precision recallrecallalso known as sensitivityis measure of model to identify the percentage of relevant data points it is defined as the number of instances of the positive class that were correctly predicted this is also known as hit ratecoverageor sensitivity the formula for recall isrecall tp tp fn recall becomes an important measure of classifier performance in scenarios where we want to catch the most number of instances of particular class even when it increases our false positives for exampleconsider the case of bank frauda model with high recall will give us higher number of potential fraud cases but it will also help us raise alarm for most of the suspicious cases the following code computes recall on our model predictions fw_rec round(meu metrics recall_score(y_true=y_testy_pred=y_pred) mc_rec round((tp(tp fn) print('framework recall:'fw_recprint('manually computed recall:'mc_recframework recall manually computed recall scorethere are some cases in which we want balanced optimization of both precision and recall score is metric that is the harmonic mean of precision and recall and helps us optimize classifier for balanced precision and recall performance the formula for the score isf score precision recall precision recall let' compute the score on the predictions made by our model using the following code fw_f round(meu metrics _score(y_true=y_testy_pred=y_pred) mc_f round(( *mc_prec*mc_rec(mc_prec+mc_rec) print('framework -score:'fw_f print('manually computed -score:'mc_f framework -score manually computed -score thus you can see how our manually computed metrics match the results obtained from the scikit-learn functions this should give you good idea of how to evaluate classification models with these metrics