{"id":21186486,"url":"https://github.com/thieu1995/permetrics","last_synced_at":"2025-04-07T15:06:35.100Z","repository":{"id":37665697,"uuid":"280617738","full_name":"thieu1995/permetrics","owner":"thieu1995","description":"Artificial intelligence (AI, ML, DL) performance metrics implemented in Python","archived":false,"fork":false,"pushed_at":"2024-09-03T22:00:38.000Z","size":2471,"stargazers_count":73,"open_issues_count":5,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T14:11:15.321Z","etag":null,"topics":["classification","classification-report","clustering-evaluation","coefficient-of-determination","deviation-of-runoff-volume","evaluation-metrics","kling-gupta-efficiency","mae","nash-sutcliffe-efficiency","performance-metrics","regression","regression-methods","relative-error","rmse","symmetric-mean-absolute-percentage","willmott-index"],"latest_commit_sha":null,"homepage":"https://permetrics.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thieu1995.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-18T08:47:17.000Z","updated_at":"2025-03-29T15:34:16.000Z","dependencies_parsed_at":"2025-01-17T19:21:53.417Z","dependency_job_id":"a60d8fb4-e7cb-4254-8616-4823f8596982","html_url":"https://github.com/thieu1995/permetrics","commit_stats":{"total_commits":463,"total_committers":5,"mean_commits":92.6,"dds":0.06263498920086397,"last_synced_commit":"24d348f6ac0aaf41247739263a04010d416e20dc"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thieu1995%2Fpermetrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thieu1995%2Fpermetrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thieu1995%2Fpermetrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thieu1995%2Fpermetrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thieu1995","download_url":"https://codeload.github.com/thieu1995/permetrics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675597,"owners_count":20977376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classification","classification-report","clustering-evaluation","coefficient-of-determination","deviation-of-runoff-volume","evaluation-metrics","kling-gupta-efficiency","mae","nash-sutcliffe-efficiency","performance-metrics","regression","regression-methods","relative-error","rmse","symmetric-mean-absolute-percentage","willmott-index"],"created_at":"2024-11-20T18:23:58.275Z","updated_at":"2025-04-07T15:06:35.070Z","avatar_url":"https://github.com/thieu1995.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n\u003cimg style=\"max-width:100%;\" \nsrc=\"https://thieu1995.github.io/post/2023-08/permetrics-01.png\" \nalt=\"PERMETRICS\"/\u003e\n\u003c/p\u003e\n\n\n---\n\n[![GitHub release](https://img.shields.io/badge/release-2.0.0-yellow.svg)](https://github.com/thieu1995/permetrics/releases)\n[![Wheel](https://img.shields.io/pypi/wheel/gensim.svg)](https://pypi.python.org/pypi/permetrics) \n[![PyPI version](https://badge.fury.io/py/permetrics.svg)](https://badge.fury.io/py/permetrics)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/permetrics.svg)\n![PyPI - Status](https://img.shields.io/pypi/status/permetrics.svg)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/permetrics.svg)\n[![Downloads](https://static.pepy.tech/badge/permetrics)](https://pepy.tech/project/permetrics)\n[![Tests \u0026 Publishes to PyPI](https://github.com/thieu1995/permetrics/actions/workflows/publish-package.yaml/badge.svg)](https://github.com/thieu1995/permetrics/actions/workflows/publish-package.yaml)\n![GitHub Release Date](https://img.shields.io/github/release-date/thieu1995/permetrics.svg)\n[![Documentation Status](https://readthedocs.org/projects/permetrics/badge/?version=latest)](https://permetrics.readthedocs.io/en/latest/?badge=latest)\n[![Chat](https://img.shields.io/badge/Chat-on%20Telegram-blue)](https://t.me/+fRVCJGuGJg1mNDg1)\n![GitHub contributors](https://img.shields.io/github/contributors/thieu1995/permetrics.svg)\n[![GitTutorial](https://img.shields.io/badge/PR-Welcome-%23FF8300.svg?)](https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project)\n[![DOI](https://zenodo.org/badge/280617738.svg)](https://zenodo.org/badge/latestdoi/280617738)\n[![JOSS](https://joss.theoj.org/papers/10.21105/joss.06143/status.svg)](https://doi.org/10.21105/joss.06143)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n\n\n\nPerMetrics is a python library for performance metrics of machine learning models. We aim to implement all \nperformance metrics for problems such as regression, classification, clustering, ... problems. Helping users in all \nfield access metrics as fast as possible. The number of available metrics include **111 (47 regression metrics, 20 classification metrics, 44 clustering \nmetrics)**\n\n\n# Citation Request \n\nPlease include these citations if you plan to use this library:\n\n- LaTeX:\n\n   ```bibtex\n  @article{Thieu_PerMetrics_A_Framework_2024,\n    author = {Thieu, Nguyen Van},\n    doi = {10.21105/joss.06143},\n    journal = {Journal of Open Source Software},\n    month = mar,\n    number = {95},\n    pages = {6143},\n    title = {{PerMetrics: A Framework of Performance Metrics for Machine Learning Models}},\n    url = {https://joss.theoj.org/papers/10.21105/joss.06143},\n    volume = {9},\n    year = {2024}\n  }\n   ```\n\n- APA:\n\n  Thieu, N. V. (2024). PerMetrics: A Framework of Performance Metrics for Machine Learning Models. Journal of Open Source Software, 9(95), 6143. https://doi.org/10.21105/joss.06143\n\n\n# Installation\n\nInstall the [current PyPI release](https://pypi.python.org/pypi/permetrics):\n```sh \n$ pip install permetrics\n```\n\nAfter installation, you can import Permetrics as any other Python module:\n\n```sh\n$ python\n\u003e\u003e\u003e import permetrics\n\u003e\u003e\u003e permetrics.__version__\n```\n\n# Example\n\nBelow is the most efficient and effective way to use this library compared to other libraries. \nThe example below returns the values of metrics such as root mean squared error, mean absolute error...\n\n```python\nfrom permetrics import RegressionMetric\n\ny_true = [3, -0.5, 2, 7]\ny_pred = [2.5, 0.0, 2, 8]\n\nevaluator = RegressionMetric(y_true, y_pred)\nresults = evaluator.get_metrics_by_list_names([\"RMSE\", \"MAE\", \"MAPE\", \"R2\", \"NSE\", \"KGE\"])\nprint(results[\"RMSE\"])\nprint(results[\"KGE\"])\n```\n\nIn case your y_true and y_pred data have multiple columns, and you want to return multiple outputs, something that other libraries cannot do, you can do it in Permetrics as follows:\n\n\n```python\nimport numpy as np\nfrom permetrics import RegressionMetric\n\ny_true = np.array([[0.5, 1], [-1, 1], [7, -6]])\ny_pred = np.array([[0, 2], [-1, 2], [8, -5]])\n\nevaluator = RegressionMetric(y_true, y_pred)\n\n## The 1st way\nresults = evaluator.get_metrics_by_dict({\n  \"RMSE\": {\"multi_output\": \"raw_values\"},\n  \"MAE\": {\"multi_output\": \"raw_values\"},\n  \"MAPE\": {\"multi_output\": \"raw_values\"},\n})\n\n## The 2nd way\nresults = evaluator.get_metrics_by_list_names(\n  list_metric_names=[\"RMSE\", \"MAE\", \"MAPE\", \"R2\", \"NSE\", \"KGE\"],\n  list_paras=[{\"multi_output\": \"raw_values\"},] * 6\n)\n\n## The 3rd way\nresult01 = evaluator.RMSE(multi_output=\"raw_values\")\nresult02 = evaluator.MAE(multi_output=\"raw_values\")\n```\n\nThe more complicated cases in the folder: [examples](/examples). You can also read the [documentation](https://permetrics.readthedocs.io/) \nfor more detailed installation instructions, explanations, and examples.\n\n\n# Contributing\n\nThere are lots of ways how you can contribute to Permetrics's development, and you are welcome to join in! For example, \nyou can report problems or make feature requests on the [issues](/issues) pages. To facilitate contributions, \nplease check for the guidelines in the [CONTRIBUTING.md](/CONTRIBUTING.md) file.\n\n\n# Official channels \n\n* [Official source code repository](https://github.com/thieu1995/permetrics)\n* [Official document](https://permetrics.readthedocs.io/)\n* [Download releases](https://pypi.org/project/permetrics/) \n* [Issue tracker](https://github.com/thieu1995/permetrics/issues) \n* [Notable changes log](/ChangeLog.md)\n* [Official discussion group](https://t.me/+fRVCJGuGJg1mNDg1) \n\n\n# Note\n\n* **Currently, there is a huge misunderstanding among frameworks around the world about the notation of R, R2, and R^2.** \n* Please read the file [R-R2-Rsquared.docx](.github/assets/R-R2-Rsquared.docx) to understand the differences between them and why there is such confusion.\n\n* **My recommendation is to denote the Coefficient of Determination as COD or R2, while the squared Pearson's \n  Correlation Coefficient should be denoted as R^2 or RSQ (as in Excel software).**\n\n\n---\n\nDeveloped by: [Thieu](mailto:nguyenthieu2102@gmail.com?Subject=Permetrics_QUESTIONS) @ 2023\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthieu1995%2Fpermetrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthieu1995%2Fpermetrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthieu1995%2Fpermetrics/lists"}