Python Machine Learning Is The Complete Guide To Everything You Need To Know About Python Machine Learning: Keras, Numpy, Scikit Learn, Tensorflow, With Useful Exercises and examples. by Myers Erick

Python Machine Learning Is The Complete Guide To Everything You Need To Know About Python Machine Learning: Keras, Numpy, Scikit Learn, Tensorflow, With Useful Exercises and examples. by Myers Erick

Author:Myers, Erick [Myers, Erick]
Language: eng
Format: epub
Published: 2019-07-04T16:00:00+00:00


Confusion Matrix Review: Classification Report

We can see some more statistic reports to find model Accuracy through the Confusion Matrix. We will also see how to find out the formula, along with the built-in cykit's built-in function.

Generation of classification report is actually above the Confusion Matrices data. To view the classification report, run the following statement,

print ("Classification Report")

# labels for set 1 = True to upper left and 0 = False to lower right

print ("{0}" format (metrics.classification_report (y_test, prediction_from_test_data, labels = [1, 0])))

Report output

Classification Report

precision recall f1-score support

1 0.61 0.65 0.63 80

0 0.81 0.78 0.79 151

avg / total 0.74 0.74 0.74 231

Here we will discuss with two topics; one is Precision and another is Recall

Precision Finding Formula

$$ Precision = \ frac {TP} {TP + FP} $$

That is, we know for the perfect condition, FP = 0, so 100% of Accurate Model

$$ Precision = \ frac {TP} {TP + 0} = \ frac {TP} {TP} = 1 $$ means that the value of Precision is as good as possible. Our target would be to make Precision's value as big as possible. ##### `Recall` exit form $$ recall = \ frac {TP} {TP + FN} $$

Similarly, in the case of 100% Accurate Model

$$ recall = \ frac {TP} {TP + 0} = \ frac {TP} {TP} = 1 $$

Again, we have the goal of increasing the value of Recall as much as possible.

Precision - 0.61 & Recall - 0.65 Not bad, but its value can be increased further. We will make that effort.

How to Improve Performance?

We can increase the performance of the model through the following methods

Adjust or modify that algorithm

Collecting more data or improving data frame

Try to Improve Training

Algorithm Changed



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.