Skip to content

yzfly/LightClassification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LightGBM Binary Classification

A simple example of Tabular data Binary Classification using LightGBM. 🐶

Requirements

pip install pandas numpy scipy scikit-learn lightgbm

Usage

python main.py --thres=0.2 --data_path=datasets/bank-additional-full.csv

🌝 output is something like this, you can optimizing the params to get better results.

[LightGBM] [Info] Total Bins 675
[LightGBM] [Info] Number of data points in the train set: 32950, number of used features: 10
[LightGBM] [Info] [binary:BoostFromScore]: pavg=0.113475 -> initscore=-2.055727
[LightGBM] [Info] Start training from score -2.055727
Training until validation scores don't improve for 10 rounds
Early stopping, best iteration is:
[51]    valid_0's auc: 0.947001
Saving LightGBM model...
Start predicting...
Acc: 0.908, F1: 0.645, Precision: 0.556, Recall: 0.768
Confusion Matrix: 
 [[6785  552]
 [ 209  692]]

Acknowledgments

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages