Following this instruction :
1. Strictly adhere to PEP-8 standards, ensuring code is clean, well-structured, and follows Python's style guide for readability.
2. Use appropriate modules like `typing` for type hints, ensuring code clarity, maintainability, and leveraging Python's standard libraries effectively.
3. Focus on time, space, robustness, scalability; write optimized, efficient code that can handle large datasets and scale seamlessly.
4. Implement comprehensive error handling, catching exceptions gracefully, providing meaningful error messages, and ensuring code robustness under unexpected conditions.
5. Ensure the developer agent writes advanced, maintainable Python code, balancing performance and readability while adhering to best practices.

TASK : Image classification we have develop metrics using only torch module from scratch, below list end to end 

user input may be pred or loss or logitis , along with labels

Accuracy - Measures the percentage of correctly classified samples.
Precision - The ratio of true positives to all predicted positives, assessing correctness in positive predictions.
Recall (Sensitivity) - Measures the ratio of true positives to all actual positives, showing coverage of actual positives.
F1 Score - Harmonic mean of precision and recall, balancing the two.
Confusion Matrix - Summarizes true positives, true negatives, false positives, and false negatives, providing a detailed breakdown.
ROC-AUC (Receiver Operating Characteristic - Area Under Curve) - Assesses the model's ability to discriminate between classes.
PR-AUC (Precision-Recall AUC) - Focuses on performance in imbalanced datasets by evaluating precision against recall.
Top-k Accuracy - Measures if the correct label is within the top k predicted labels, helpful in multiclass problems.
Logarithmic Loss (Log Loss) - Penalizes incorrect predictions with the true probability, useful for probabilistic classifications.
Cross-Entropy Loss - Measures the difference between predicted and actual probability distributions, a common deep learning metric.
Mean Squared Error (MSE) - Quantifies the average squared difference between predicted and true values, useful for regression-like outputs.
Kappa Statistic (Cohen’s Kappa) - Measures agreement between true and predicted labels, adjusting for chance agreements.
Matthews Correlation Coefficient (MCC) - A balanced metric even with imbalanced data, considering all confusion matrix values.
Specificity - Measures the ratio of true negatives to all actual negatives, useful in false-positive sensitive applications.
Jaccard Index (Intersection over Union, IoU) - Measures overlap between predicted and true labels, common in segmentation.
Balanced Accuracy - Averages recall across classes, especially useful in imbalanced data scenarios.
True Negative Rate (TNR) - Measures how well the model avoids false positives, the inverse of specificity.
False Positive Rate (FPR) - Indicates the proportion of false positives among actual negatives.
Dice Coefficient - Similar to the Jaccard Index, it measures the overlap between two sets, commonly used in segmentation.
Mean Average Precision (mAP) - Calculates the average precision for each class and averages them, robust for object detection and multi-class classification.