0% found this document useful (0 votes)
35 views3 pages

What Are The Evaluation Metrics in Machine Learning

Uploaded by

locefo3178
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views3 pages

What Are The Evaluation Metrics in Machine Learning

Uploaded by

locefo3178
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

what are the evaluation metrics in machine learning?

Evaluation metrics in machine learning are used to measure the performance of a model. Different
metrics are suitable for different types of problems, such as classification, regression, clustering, and
ranking. Here are some common evaluation metrics categorized by the type of task:

1. Classification Metrics

Binary Classification

• Accuracy: The ratio of correctly predicted instances to the total instances.

Accuracy=TP+TNTP+TN+FP+FNAccuracy=TP+TN+FP+FNTP+TN

where TP = True Positives, TN = True Negatives, FP = False Positives, FN = False Negatives.

• Precision: The ratio of correctly predicted positive observations to the total predicted positives.

Precision=TPTP+FPPrecision=TP+FPTP

• Recall (Sensitivity or True Positive Rate): The ratio of correctly predicted positive observations
to all observations in the actual class.

Recall=TPTP+FNRecall=TP+FNTP

• F1 Score: The harmonic mean of precision and recall.

F1 Score=2×Precision×RecallPrecision+RecallF1 Score=2×Precision+RecallPrecision×Recall

• ROC-AUC (Receiver Operating Characteristic - Area Under Curve): Measures the ability of the
classifier to distinguish between classes.

• ROC Curve: A plot of the true positive rate (recall) against the false positive rate.

• AUC: The area under the ROC curve.

• Confusion Matrix: A table used to describe the performance of a classification model by


showing the actual vs. predicted classifications.

Multi-Class Classification

• Macro-Averaged Metrics: Compute the metric independently for each class and then take the
average.

• Micro-Averaged Metrics: Aggregate the contributions of all classes to compute the average
metric.

2. Regression Metrics

• Mean Absolute Error (MAE): The average of the absolute differences between the predicted
and actual values.

MAE=1𝑛∑𝑖=1𝑛∣𝑦𝑖−𝑦^𝑖∣MAE=n1i=1∑n∣yi−y^i∣
• Mean Squared Error (MSE): The average of the squared differences between the predicted and
actual values.

MSE=1𝑛∑𝑖=1𝑛(𝑦𝑖−𝑦^𝑖)2MSE=n1i=1∑n(yi−y^i)2

• Root Mean Squared Error (RMSE): The square root of the MSE, providing an error metric in the
same units as the output variable.

RMSE=1𝑛∑𝑖=1𝑛(𝑦𝑖−𝑦^𝑖)2RMSE=n1i=1∑n(yi−y^i)2

• R-squared (Coefficient of Determination): Measures the proportion of the variance in the


dependent variable that is predictable from the independent variables.

𝑅2=1−∑𝑖=1𝑛(𝑦𝑖−𝑦^𝑖)2∑𝑖=1𝑛(𝑦𝑖−𝑦ˉ)2R2=1−∑i=1n(yi−yˉ)2∑i=1n(yi−y^i)2

where 𝑦ˉyˉ is the mean of the actual values.

3. Clustering Metrics

• Silhouette Score: Measures how similar an object is to its own cluster compared to other
clusters.

Silhouette Score=𝑏−𝑎max⁡(𝑎,𝑏)Silhouette Score=max(a,b)b−a

where 𝑎a is the average intra-cluster distance and 𝑏b is the average nearest-cluster distance.

• Adjusted Rand Index (ARI): Measures the similarity between two data clusterings by
considering all pairs of samples and counting pairs that are assigned in the same or different
clusters.

• Davies-Bouldin Index: Measures the average similarity ratio of each cluster with its most similar
cluster.

• Calinski-Harabasz Index: The ratio of the sum of between-cluster dispersion and within-cluster
dispersion.

4. Ranking Metrics

• Mean Average Precision (MAP): Measures the mean of the average precision scores for a set of
queries.

• Normalized Discounted Cumulative Gain (NDCG): Measures the gain of the result list based on
the position of the result and the graded relevance of the result.

• Precision@k: Measures the precision of the top 𝑘k items in the ranked list.

5. Other Metrics

• Log Loss (Cross-Entropy Loss): Measures the performance of a classification model where the
prediction input is a probability value between 0 and 1.

Choosing the right evaluation metric depends on the specific problem and the goals of the model. For
example, in imbalanced classification problems, accuracy might be less informative, and metrics like
precision, recall, and F1 score become more relevant. For regression problems, RMSE and MAE are often
used to provide insights into prediction errors.

You might also like