fcakyon/balanced-loss
Easy to use class balanced cross entropy and focal loss implementation for Pytorch
This tool helps machine learning engineers and researchers improve the accuracy of their classification models when working with datasets where some categories have many more examples than others. It takes model predictions and actual labels, along with the count of examples for each category, and produces a more effective loss calculation. This helps your models learn better from imbalanced data.
Used by 1 other package. No commits in the last 6 months. Available on PyPI.
Use this if you are building machine learning classification models in PyTorch and notice that your model performs poorly on categories with fewer training examples due to imbalanced datasets.
Not ideal if your dataset has a balanced distribution of examples across all categories, or if you are not working with PyTorch classification models.
Stars
98
Forks
8
Language
Python
License
MIT
Category
Last pushed
Dec 17, 2024
Commits (30d)
0
Dependencies
2
Reverse dependents
1
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/fcakyon/balanced-loss"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
HelmchenLabSoftware/Cascade
Calibrated inference of spiking from calcium ΔF/F data using deep networks
adobe/antialiased-cnns
pip install antialiased-cnns to improve stability and accuracy
KaiyangZhou/pytorch-center-loss
Pytorch implementation of Center Loss
kimhc6028/relational-networks
Pytorch implementation of "A simple neural network module for relational reasoning" (Relational Networks)
devsisters/pointer-network-tensorflow
TensorFlow implementation of "Pointer Networks"