Classification algorithm in machine learning


Download 232.74 Kb.
bet3/4
Sana09.03.2023
Hajmi232.74 Kb.
#1255916
1   2   3   4
Bog'liq
Machine Learning classification

Confusion matrix . Confusion matrix gives us a matrix/table as output and describes the performance of the model.
The matrix consists of prediction results in a generalized form with the total number of correct predictions and incorrect predictions. The matrix looks like the following table:

Thus, we present methods for evaluating the classification model.
Accuracy
Accuracy is the simplest and most straightforward classification metric, measuring the proportion of observations that are correctly classified . The formula is as follows:

Here, N is the number of elements in the set for which the accuracy of the model is calculated.
.
Simply put, it measures the absence of error rate. 90% accuracy means that 90 out of 100 observations are correctly classified. This measure is appropriate when the values of positive and negative targets in the data set are equal,
Thinking in terms of a confusion matrix, we sometimes say "diagonal over all samples". Simply put, it measures the absence of error rate. 90% accuracy means that 90 out of 100 observations are correctly classified.
Although 90% accuracy may seem promising at first, using a measure of accuracy in an unbalanced data set can be misleading.
Precision and Recall
Precision is the proportion of cases marked as positive that are actually positive. In other words, accuracy measures "how useful the results of our classifier are". The formula is as follows:

For example, 90% accuracy means that when our classifier flags an email as spam, it really is spam 90 out of 100 times.


Another way to identify TPs is to use recall. Recall is the percentage of true positives that are marked as positive. It measures the "completeness of the results" - that is, what percentage of true positives are predicted to be positive. The formula is as follows:

That is, a 90% recall means that the classifier correctly identifies 90% of all spam emails, so 10% are marked as not spam.



Download 232.74 Kb.

Do'stlaringiz bilan baham:
1   2   3   4




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling