{"id":20465582,"url":"https://github.com/kadirnar/losshub","last_synced_at":"2025-07-19T20:11:11.407Z","repository":{"id":58167358,"uuid":"527029218","full_name":"kadirnar/losshub","owner":"kadirnar","description":"LossHub: Loss Functions Library for Image Classification and Detection","archived":false,"fork":false,"pushed_at":"2022-10-09T11:48:06.000Z","size":33,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-14T15:18:16.642Z","etag":null,"topics":["deep-learning","loss-functions","object-classification"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kadirnar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-20T20:09:19.000Z","updated_at":"2024-09-27T22:52:45.000Z","dependencies_parsed_at":"2023-01-19T16:15:09.635Z","dependency_job_id":null,"html_url":"https://github.com/kadirnar/losshub","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kadirnar/losshub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2Flosshub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2Flosshub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2Flosshub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2Flosshub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kadirnar","download_url":"https://codeload.github.com/kadirnar/losshub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2Flosshub/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265882009,"owners_count":23843509,"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":["deep-learning","loss-functions","object-classification"],"created_at":"2024-11-15T13:19:07.252Z","updated_at":"2025-07-19T20:11:11.386Z","avatar_url":"https://github.com/kadirnar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"doc/logo.png\" width=\"450\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e LossHub: Loss Functions Library for Image Classification and Detection\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://badge.fury.io/for/py/losshub\"\u003e\u003cimg src=\"https://badge.fury.io/py/losshub.svg\" alt=\"pypi version\"\u003e\u003c/a\u003e\n    \u003ca href=\"[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/kadirnar)\"\u003e\u003cimg src=\"https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue.svg\" alt=\"hugging face spaces\"\u003e\u003c/a\u003e\n    \u003ca href=\"[![Medium](https://img.shields.io/badge/Medium-Blog-red)](https://medium.com/@kadir.nar)\"\u003e\u003cimg src=\"https://img.shields.io/badge/%20Medium%20-Blog-blue.svg\" alt=\"medium\"\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n## Loss Functions for Image Classification\n\nRmse: It is a frequently used measure of the differences between values (sample or population values) predicted by a model or an estimator and the values observed. \n### $$\\text{rmse}(x,y) = \\sqrt{\\frac{1}{n}\\sum_{i=1}^n (x_i - y_i)^2}$$\nMse: In statistics, the mean squared error or mean squared deviation of an estimator (of a procedure for estimating an unobserved quantity) measures the average of the squares of the errors—that is, the average squared difference between the estimated values and the actual value. \n### $$\\text{mse}(x,y) = \\frac{1}{n} \\sum_{i=1}^n (x_i - y_i)^2$$\n\n\n## Installation\n```bash\npip install losshub\n```\n\n## Usage\n```python\nfrom losshub.losses import mse, rmse\n# outputs and labels\ny_true = [1, 2, 3, 4, 5]\ny_pred = [1, 2, 3, 4, 5]\n# mse\nmse(y_true, y_pred)\n# rmse\nrmse(y_true, y_pred)\n```\n\n## References\n- [Balanced-Loss](https://github.com/fcakyon/balanced-loss/)\n- [Rmse](https://en.wikipedia.org/wiki/Root_mean_squared_error)\n- [Mse](https://en.wikipedia.org/wiki/Mean_squared_error)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirnar%2Flosshub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkadirnar%2Flosshub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirnar%2Flosshub/lists"}