<jupyter_start><jupyter_text>Loading Confusion Matrix<jupyter_code>from sklearn.metrics import confusion_matrix
confusion_matrix(y_train, y_train_pred)<jupyter_output><empty_output><jupyter_text>Conclusionclass-1 have total 40 data out of which 40 are correctly predictedclass-2 have total 37 data out of which 35 are correctly predicted and 2 for class -3 class-2 have total 35 data out of which 34 are correctly predicted and 1 for class -2total correct prediction = 109 and incorrect prediction = 3<jupyter_code># for testing data
confusion_matrix(y_test,  y_test_pred)<jupyter_output><empty_output><jupyter_text>error on class2 one data predicted class-3 and rest all is fine  precision and recall  Precision of class -1 (accurate) :- what % of predicted is actual 1for exam for class 3 precison is (15/16)for exam for class 2 recall is (12/13) 12 were tyrue from 13 predicted<jupyter_code>from sklearn.metrics import classification_report
print(classification_report(y_test, y_test_pred))<jupyter_output>precision    recall  f1-score   support

           0       1.00      1.00      1.00         9
           1       0.92      0.92      0.92        12
           2       0.94      0.94      0.94        17

    accuracy                           0.95        38
   macro avg       0.95      0.95      0.95        38
weighted avg       0.95      0.95      0.95        38
{'fraction_non_alphanumeric': 0.05458515283842795, 'fraction_numerical': 0.07569141193595343, 'mean_word_length': 2.6184210526315788, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '475093', 'license': 'MIT', 'n_tokens_mistral': 463, 'n_tokens_neox': 404, 'n_words': 147, 'path': 'MACHINE-LEARNING/Classification_measures/classification.ipynb', 'repo_name': 'ravi4713/Resources', 'size': '1374'}