Proposal to Add tau_metric as a New Classification Performance Measure

### Describe the workflow you want to enable

The goal is to introduce a new metric, the tau_metric, which evaluates classification accuracy through a geometric approach. This metric considers the distances from a model's predictions to a perfect and a random-guess scenario in a normalized performance space. It is applicable to both binary and multi-class classification tasks. This new metric aims to provide a more intuitive understanding of model performance, especially in cases where traditional metrics like accuracy or F1-score might not fully capture the nuances of the classification outcomes.

### Describe your proposed solution

The `tau_metric` computes the Euclidean distances from the model's performance point (defined by the normalized true positives across each class) to both a perfect point (where all predictions are correct) and a random-guess point (representing random predictions). The score is then derived by normalizing these distances to fall within a range from 0 (worst) to 1 (best), where 1 indicates a perfect model and 0 indicates a model performing no better than random guessing.

The metric will be implemented in a new function `tau_score`, which will:

- Calculate normalized True Positive and True Negative rates for binary classifications.
- Extend the calculation to handle multi-class scenarios by computing a model point for each class.
- Compare these model points to theoretical perfect and random points.
- Use Euclidean distances to determine how close the model's predictions are to perfect predictions.
- Normalize the resulting score.

### Formula:

For each class 𝑖, calculate:

- **TPR<sub>i</sub> = TP<sub>i</sub> / (TP<sub>i</sub> + FN<sub>i</sub>)** (True Positive Rate)
- **TNR<sub>i</sub> = TN<sub>i</sub> / (TN<sub>i</sub> + FP<sub>i</sub>)** (True Negative Rate)

The model point for class 𝑖 is **(TNR<sub>i</sub>, TPR<sub>i</sub>)**.

The perfect point is **(1, 1)** for each class, and the random point is **(0.5, 0.5)** for each class.

The Tau score is then calculated as:
**Tau = 1 - (mean Euclidean distance from model points to perfect points) / (maximum possible distance (which is √2 for a normalized space))**


### Describe alternatives you've considered, if relevant

Traditional metrics like accuracy, precision, recall, and F1-score have been considered. However, these do not always provide a clear geometric interpretation of model performance across the full spectrum of class imbalances and multi-class complexities. The tau_metric adds value by offering a different perspective that complements existing metrics.



### Additional context

The tau_metric is inspired by the need for more comprehensive performance metrics that account for both class imbalances and the multi-dimensional nature of classification tasks in modern machine learning applications. This metric could be particularly useful in educational and research settings where a deeper analysis of model behavior is required.

Published Research paper: : [https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9756878](https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fieeexplore.ieee.org%2Fstamp%2Fstamp.jsp%3Ftp%3D%26arnumber%3D9756878&data=05%7C02%7Cspq6r%40umsl.edu%7C36b3fcdb01544870352808dc4453ba88%7Ce3fefdbef7e9401ba51a355e01b05a89%7C0%7C0%7C638460373604635936%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=8zFTZb1cw0U%2F5VXSTEG75ao1YJBX6U0%2FaltNkFSzjwc%3D&reserved=0)

COMMENT:
I don't think this passes our inclusion criteria unfortunately. It's best packaged separately for the community. Thanks for your efforts opening the issue and the corresponding pull request though.

Labels: New Feature, Needs Triage