Page 148 - Ai_C10_Flipbook
P. 148
Evaluation Metrics for Classification
Classification is a type of supervised learning in machine learning where the goal is to predict the categorical label
or class of a given input based on historical data. In classification tasks, the model is trained on a labelled dataset,
where a specific type of class label is the result to be predicted from the given input field of data. The model learns
to map inputs to the correct category during the training phase.
What is Classification?
Classification is the task of “classifying things” into sub-categories. Classification is part of supervised machine
learning in which we put labelled data for training. For example, You and your friends go to a restaurant, where
pure vegetarians sit together at one table and non-vegetarians sit together at another table, to ensure that there
is no confusion while serving food.
So basically, you are classifying your friends into two categories:
• Pure vegetarians • Non-vegetarians
CLASSIFICATION IN MACHINE LEARNING
Vegetarian
Non-vegetarian
Eggetarian
Vegan
4 Classes 2 Classes
Classification usually refers to categorisation of a specific class label that needs to be predicted from the given
input field of data as a result. For example, here we are working on a pure vegetarian service model that predicts
whether the item served is for a pure vegetarian or for all.
Classification Metrics
When evaluating a classification model, it’s important to measure its performance using various metrics. These
metrics help assess how well the model predicts the correct classes.
Here are some popular metrics used for classification models:
• Confusion matrix • Classification accuracy • Precision • Recall
Confusion Matrix
A confusion matrix is a performance evaluation tool used in machine learning to assess the performance of
a classification model. It is a tabular representation that compares the actual labels (true outcomes) with the
predicted labels (model predictions). The table is made with 4 different combinations of predicted and actual
values in the form of 2×2 matrix. The comparison between the prediction and the reality can be used to evaluate
the rate of success. It also gives a clear picture of which classes are being predicted correctly and incorrectly, and
the types of errors are being made.
This matrix is also known as the Error Matrix and is used in situations where we need to evaluate the performance
of the model, identify errors, and find ways to improve the efficiency of the model. It is useful for measuring Recall,
Precision, Accuracy and F1 Score.
146 Artificial Intelligence Play (Ver 1.0)-X

