Modelling Customer Churn using LightGBM

Go to Top

References

Load the libraries

Go to Top

Colab

Useful Scripts

Go to Top

Load the Data

Go to Top

Data Processing

Go to Top

Data Processing

Data Types

Train and Test Data

Numerical and Categorical Features

Custom Features

Train Validation Split

Modelling

Go to Top

lgb.LGBMClassifier(
    boosting_type     = 'gbdt',
    num_leaves        = 31,
    max_depth         = -1,
    learning_rate     = 0.1,
    n_estimators      = 100,
    subsample_for_bin = 200000,
    objective         = None,
    class_weight      = None,
    min_split_gain    = 0.0,
    min_child_weight  = 0.001,
    min_child_samples = 20,
    subsample         = 1.0,
    subsample_freq    = 0,
    colsample_bytree  = 1.0,
    reg_alpha         = 0.0,
    reg_lambda        = 0.0,
    random_state      = None,
    n_jobs            = -1,
    silent            = True,
    importance_type   = 'split',
    **kwargs,
)


model.fit(
sample_weight         = None,
init_score            = None,
eval_set              = None,
eval_names            = None,
eval_sample_weight    = None,
eval_class_weight     = None,
eval_init_score       = None,
eval_metric           = None,
early_stopping_rounds = None,
verbose               = True,
feature_name          = 'auto',
categorical_feature   = 'auto',
callbacks             = None
)

LightGBM HPO Using Optuna

Optuna Visualization

Go to Top

Model Evaluation

Go to Top

Model Evaluation using SHAP

Time Taken

Go to Top