allmetrics 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: allmetrics
3
+ Version: 0.0.0
4
+ Summary: A library for evaluation metrics.
5
+ Author: Morteza Alizadeh
6
+ Author-email: alizadehmorteza2020@gmail.com
7
+ License: MIT
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ License-File: LICENSE
13
+ Requires-Dist: numpy
14
+ Dynamic: author
15
+ Dynamic: author-email
16
+ Dynamic: classifier
17
+ Dynamic: license
18
+ Dynamic: license-file
19
+ Dynamic: requires-dist
20
+ Dynamic: requires-python
21
+ Dynamic: summary
@@ -0,0 +1,163 @@
1
+ # AllMetrics: A Comprehensive Metric Library for Machine Learning Tasks
2
+
3
+ ![Python](https://img.shields.io/badge/python-3.7%2B-blue)
4
+ ![License](https://img.shields.io/badge/license-MIT-green)
5
+
6
+ PanMetrics is a comprehensive Python library that provides a wide range of evaluation metrics for various machine learning tasks including regression, classification, clustering, segmentation, and image-to-image translation.
7
+
8
+ ## Features
9
+
10
+ - **Unified interface** for metrics across different ML tasks
11
+ - **Comprehensive collection** of evaluation metrics
12
+ - **Easy integration** with existing ML workflows
13
+ - **Consistent API** across all metric types
14
+
15
+ ## Installation
16
+
17
+ You can install AllMetrics using pip:
18
+
19
+ ```bash
20
+ pip install allmetrics
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ### Regression Metrics
26
+
27
+ ```python
28
+ from allmetrics.regression import mean_absolute_error, r_squared
29
+
30
+ y_true = [3, -0.5, 2, 7]
31
+ y_pred = [2.5, 0.0, 2, 8]
32
+
33
+ print(mean_absolute_error(y_true, y_pred))
34
+ print(r_squared(y_true, y_pred))
35
+ ```
36
+
37
+ Available regression metrics:
38
+ - Mean Absolute Error (`mean_absolute_error`)
39
+ - Mean Squared Error (`mean_squared_error`)
40
+ - Mean Absolute Percentage Error (`mean_absolute_percentage_error`)
41
+ - Mean Squared Log Error (`mean_squared_log_error`)
42
+ - Mean Bias Deviation (`mean_bias_deviation`)
43
+ - Median Absolute Error (`median_absolute_error`)
44
+ - Symmetric Mean Absolute Percentage Error (`symmetric_mean_absolute_percentage_error`)
45
+ - Relative Squared Error (`relative_squared_error`)
46
+ - R-squared (`r_squared`)
47
+ - Explained Variance (`explained_variance`)
48
+ - Huber Loss (`huber_loss`)
49
+ - Log Cosh Loss (`log_cosh_loss`)
50
+ - Max Error (`max_error`)
51
+ - Mean Tweedie Deviance (`mean_tweedie_deviance`)
52
+ - Mean Pinball Loss (`mean_pinball_loss`)
53
+
54
+ ### Classification Metrics
55
+
56
+ ```python
57
+ from allmetrics.classification import accuracy_score, f1_score
58
+
59
+ y_true = [0, 1, 0, 1]
60
+ y_pred = [0, 1, 1, 0]
61
+
62
+ print(accuracy_score(y_true, y_pred))
63
+ print(f1_score(y_true, y_pred))
64
+ ```
65
+
66
+ Available classification metrics:
67
+ - Accuracy (`accuracy_score`)
68
+ - Precision (`precision_score`)
69
+ - Recall (`recall_score`)
70
+ - F1 Score (`f1_score`)
71
+ - Balanced Accuracy (`balanced_accuracy`)
72
+ - Matthews Correlation Coefficient (`matthews_correlation_coefficient`)
73
+ - Cohen's Kappa (`cohens_kappa`)
74
+ - FBeta Score (`fbeta_score`)
75
+ - Jaccard Score (`jaccard_score`)
76
+
77
+ ### Clustering Metrics
78
+
79
+ ```python
80
+ from allmetrics.clustering import adjusted_rand_score, silhouette_score
81
+
82
+ labels_true = [0, 0, 1, 1]
83
+ labels_pred = [1, 1, 0, 0]
84
+
85
+ print(adjusted_rand_score(labels_true, labels_pred))
86
+ print(silhouette_score(labels_true, labels_pred))
87
+ ```
88
+
89
+ Available clustering metrics:
90
+ - Rand Score (`rand_score`)
91
+ - Adjusted Rand Score (`adjusted_rand_score`)
92
+ - Mutual Information Score (`mutual_info_score`)
93
+ - Normalized Mutual Information Score (`normalized_mutual_info_score`)
94
+ - Silhouette Score (`silhouette_score`)
95
+ - Calinski-Harabasz Score (`calinski_harabasz_score`)
96
+ - Davies-Bouldin Score (`davies_bouldin_score`)
97
+ - Homogeneity Score (`homogeneity_score`)
98
+ - Completeness Score (`completeness_score`)
99
+ - V-Measure Score (`v_measure_score`)
100
+ - Fowlkes-Mallows Score (`fowlkes_mallows_score`)
101
+
102
+ ### Segmentation Metrics
103
+
104
+ ```python
105
+ from allmetrics.segmentation import dice_score, iou_score
106
+
107
+ y_true = [[0, 1, 1], [1, 0, 0]]
108
+ y_pred = [[0, 1, 0], [1, 0, 1]]
109
+
110
+ print(dice_score(y_true, y_pred))
111
+ print(iou_score(y_true, y_pred))
112
+ ```
113
+
114
+ Available segmentation metrics:
115
+ - Dice Score (`dice_score`)
116
+ - IoU Score (`iou_score`)
117
+ - Sensitivity (`sensitivity`)
118
+ - Specificity (`specificity`)
119
+ - Precision (`precision`)
120
+ - Hausdorff Distance (`hausdorff_distance`)
121
+
122
+ ### Image-to-Image Translation Metrics
123
+
124
+ ```python
125
+ from allmetrics.imagetoimage import psnr, ssim
126
+
127
+ img1 = ... # numpy array of image 1
128
+ img2 = ... # numpy array of image 2
129
+
130
+ print(psnr(img1, img2))
131
+ print(ssim(img1, img2))
132
+ ```
133
+
134
+ Available image-to-image metrics:
135
+ - PSNR (`psnr`)
136
+ - SSIM (`ssim`)
137
+
138
+ ## Contributing
139
+
140
+ We welcome contributions to AllMetrics! Please see our [Contribution Guidelines](CONTRIBUTING.md) for more information.
141
+
142
+ ## License
143
+
144
+ AllMetrics is released under the MIT License. See [LICENSE](LICENSE) for details.
145
+
146
+ ## Citation
147
+
148
+ <!-- If you use PanMetrics in your research, please consider citing it:
149
+
150
+ ```bibtex
151
+ @software{PanMetrics,
152
+ author = {Your Name},
153
+ title = {panmetrics: A Unified Python Library for Standardized Metric Evaluation and Robust Data Validation in Machine Learning},
154
+ year = {2023},
155
+ publisher = {GitHub},
156
+ journal = {GitHub repository},
157
+ howpublished = {\url{https://github.com/yourusername/panmetrics}}
158
+ }
159
+ ``` -->
160
+
161
+ ## Support
162
+
163
+ For questions, issues, or feature requests, please open an issue on our [GitHub repository].
File without changes
File without changes