Optuna Class Weight Cost-Sensitive Learning
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file classWeightLearn-1.0.0.tar.gz.
File metadata
- Download URL: classWeightLearn-1.0.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e399a3d13f6ffc5004d7d31aafea1e6d21a6bad4600639384b7cab586e7f5ae3
|
|
| MD5 |
dbbc2230ad5f7255a30875ff0a73d890
|
|
| BLAKE2b-256 |
b197417121b10f560384d6cfa2215465f8f207931461c81d6f54600624e32d24
|
File details
Details for the file classWeightLearn-1.0.0-py3-none-any.whl.
File metadata
- Download URL: classWeightLearn-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7395ad1c91253d1ebbb7fa4f5831de5bfda5c691f35fdb3d317656e820acde9
|
|
| MD5 |
213b2a4d67640ec96a7c280c63cb2d19
|
|
| BLAKE2b-256 |
0fb9d5e1e8a335eb9bbba45fa09abdf81f985fc263d6b2418c7937642d4eed3e
|