Modelling Customer Churn

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

Modelling: evalML

Go to Top

Select the Objective

Go to Top

In real business situations, we have different cost of misclassifying different components.

Here, let's choose following costs:

true_positive   = 400   ==> PROFIT of $400
                        ==> intervene, incentivize the customer to stay,
                            and sign a new contract.

true_negative   = 0     ==> nothing needs to be done for that customer.


false_positive  = -100  ==> COST of $100
                        ==> marketing and effort to retain the user.

false_negative  = -200  ==> COST of $200
                        ==> Revenue lost by losing customer.


false_negative/false_positive = 2

AutoML Search

Go to Top

AutoMLSearch(
    problem_type             = None,
    objective                = 'auto', # r2, log loss binary/multiclass
    max_iterations           = None,
    max_time                 = None, # inteter is seconds, strings: minutes hours
    patience                 = None, # default is no early stopping
    tolerance                = None,
    data_split               = None, # StratifiedKFold
    allowed_pipelines        = None,
    allowed_model_families   = None,
    start_iteration_callback = None,
    add_result_callback      = None,
    error_callback           = None,
    additional_objectives    = None,
    random_state             = 0,
    n_jobs                   = -1,
    tuner_class              = None,
    verbose                  = True,
    optimize_thresholds      = False,
    ensembling               = False,
    max_batches              = None,
    problem_configuration    = None,
    _pipelines_per_batch     = 5,
)


automl.search(X, y,
              data_checks='auto',
              show_iteration_plot=True)

Default Objective

Go to Top

Ojbective: Cost Benefit Matrix

Go to Top

Model Evaluation

Go to Top

Time Taken

Go to Top