Cost Sensitive Learning
This is an Extended research from CTGAN-ENN, on algorithm-level approach by fine tuning class-weight using optuna, the supported model are SVM, Random Forest and LightBGM (other models come soon), the classifier model will run with the best class_weight parameter
Instalation
pip install classWeightLearn
Example Usage
from classWeightLearn import find_best_class_weight
best_weight_svc = find_best_class_weight(X, y, model_name='svc', n_trials=1)
classifier = SVC(class_weight=best_weight_svc)
Variables
- X : all features of your dataset
- y : target label of your dataset
- model_name : supported models are (svc, lightgbm and random_forest)
- n_trials : the number of trial that optuna will run (default:1)
Metadata
Release files for classWeightLearn 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| classWeightLearn-1.0.0.tar.gz | 2.2 kB | Without provenance | Details for classWeightLearn-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| classWeightLearn-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for classWeightLearn-1.0.0-py3-none-any.whl |
Total release size: 4.8 kB
Release files / classWeightLearn-1.0.0.tar.gz
| Download URL | classWeightLearn-1.0.0.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e399a3d13f6ffc5004d7d31aafea1e6d21a6bad4600639384b7cab586e7f5ae3
|
|
BLAKE2b-256 checksum How to use checksums |
b197417121b10f560384d6cfa2215465f8f207931461c81d6f54600624e32d24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.5
|
Release files / classWeightLearn-1.0.0-py3-none-any.whl
| Download URL | classWeightLearn-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7395ad1c91253d1ebbb7fa4f5831de5bfda5c691f35fdb3d317656e820acde9
|
|
BLAKE2b-256 checksum How to use checksums |
0fb9d5e1e8a335eb9bbba45fa09abdf81f985fc263d6b2418c7937642d4eed3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.5
|
Security for classWeightLearn 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.