<jupyter_start><jupyter_text>Confusion Matrix<jupyter_code>from sklearn.metrics import confusion_matrix
confusion_matrix(y_train,y_train_pred)                       #True,Pred
#Class 0 is classified completely correct
#Class 1 correctly classified 35 of 39 examples
#For Class 2, classifier got 'confused' for 1 point
confusion_matrix(y_test,y_test_pred) 
from sklearn.metrics import classification_report
#classification_report(y_test,y_test_pred)                            #Not Tabulated
print(classification_report(y_test,y_test_pred))<jupyter_output>precision    recall  f1-score   support

           0       1.00      1.00      1.00        13
           1       1.00      0.91      0.95        11
           2       0.93      1.00      0.97        14

   micro avg       0.97      0.97      0.97        38
   macro avg       0.98      0.97      0.97        38
weighted avg       0.98      0.97      0.97        38
{'fraction_non_alphanumeric': 0.057608695652173914, 'fraction_numerical': 0.08478260869565217, 'mean_word_length': 1.7824773413897281, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '418872', 'license': 'MIT', 'n_tokens_mistral': 321, 'n_tokens_neox': 281, 'n_words': 75, 'path': '10. Confusion Matrix.ipynb', 'repo_name': 'Manav29/ML-Practice', 'size': '920'}