Implementation of various metrics for regression and classification problems. For Data Science and Machine Learning projects, it is important to have a good understanding of the metrics used to evaluate the performance of the model. This repository contains the implementation of various metrics for regression and classification problems. The metrics are implemented in Python and are available as a Python package. The metrics are implemented using NumPy and are implemented from scratch. The metrics are implemented using the formulae given in the Wikipedia pages for the respective metrics. The metrics are implemented in the following order:
- R2 Score
R2 score, also known as the coefficient of determination, is a statistical measure of how close the data are to the fitted regression line. It is also known as the coefficient of determination, or the coefficient of multiple determination for multiple regression.
- Mean Absolute Error
- Mean Squared Error
- Root Mean Squared Error
- Mean Absolute Percentage Error
- Mean Squared Logarithmic Error
- Median Absolute Error
- Median Squared Error
- Median Absolute Percentage Error
- Median Squared Logarithmic Error
- Explained Variance Score
- Max Error
- Mean Bias Error
- Mean Percentage Error
- Mean Squared Percentage Error
- Median Bias Error
- Median Percentage Error
- Median Squared Percentage Error
- Mean Absolute Scaled Error
- Mean Squared Scaled Error
- Median Absolute Scaled Error
- Median Squared Scaled Error
- Accuracy
- Precision
- Recall
- F1 Score
- Matthews Correlation Coefficient
- Cohen's Kappa
where
- Area Under the Receiver Operating Characteristic Curve (ROC AUC)
- Area Under the Precision-Recall Curve (PR AUC)
- Hamming Loss
- Zero-One Loss
- Jaccard Similarity Score
- Fowlkes-Mallows Score
- Log Loss
- Cross-Entropy Loss
- Hinge Loss
- Squared Hinge Loss
- Classification Error
- Balanced Classification Error