YAML Metadata
Error:
"widget" must be an array
Model description
This is a Logistic Regression model trained on churn dataset.
Intended uses & limitations
This model is not ready to be used in production.
Training Procedure
Hyperparameters
The model is trained with below hyperparameters.
Click to expand
| Hyperparameter | Value |
|---|---|
| memory | |
| steps | [('preprocessor', ColumnTransformer(transformers=[('num', Pipeline(steps=[('imputer', SimpleImputer(strategy='median')), ('std_scaler', StandardScaler())]), ['MonthlyCharges', 'TotalCharges', 'tenure']), ('cat', OneHotEncoder(handle_unknown='ignore'), ['SeniorCitizen', 'gender', 'Partner', 'Dependents', 'PhoneService', 'MultipleLines', 'InternetService', 'OnlineSecurity', 'OnlineBackup', 'DeviceProtection', 'TechSupport', 'StreamingTV', 'StreamingMovies', 'Contract', 'PaperlessBilling', 'PaymentMethod'])])), ('classifier', LogisticRegression(class_weight='balanced', max_iter=300))] |
| verbose | False |
| preprocessor | ColumnTransformer(transformers=[('num', Pipeline(steps=[('imputer', SimpleImputer(strategy='median')), ('std_scaler', StandardScaler())]), ['MonthlyCharges', 'TotalCharges', 'tenure']), ('cat', OneHotEncoder(handle_unknown='ignore'), ['SeniorCitizen', 'gender', 'Partner', 'Dependents', 'PhoneService', 'MultipleLines', 'InternetService', 'OnlineSecurity', 'OnlineBackup', 'DeviceProtection', 'TechSupport', 'StreamingTV', 'StreamingMovies', 'Contract', 'PaperlessBilling', 'PaymentMethod'])]) |
| classifier | LogisticRegression(class_weight='balanced', max_iter=300) |
| preprocessor__n_jobs | |
| preprocessor__remainder | drop |
| preprocessor__sparse_threshold | 0.3 |
| preprocessor__transformer_weights | |
| preprocessor__transformers | [('num', Pipeline(steps=[('imputer', SimpleImputer(strategy='median')), ('std_scaler', StandardScaler())]), ['MonthlyCharges', 'TotalCharges', 'tenure']), ('cat', OneHotEncoder(handle_unknown='ignore'), ['SeniorCitizen', 'gender', 'Partner', 'Dependents', 'PhoneService', 'MultipleLines', 'InternetService', 'OnlineSecurity', 'OnlineBackup', 'DeviceProtection', 'TechSupport', 'StreamingTV', 'StreamingMovies', 'Contract', 'PaperlessBilling', 'PaymentMethod'])] |
| preprocessor__verbose | False |
| preprocessor__verbose_feature_names_out | True |
| preprocessor__num | Pipeline(steps=[('imputer', SimpleImputer(strategy='median')), ('std_scaler', StandardScaler())]) |
| preprocessor__cat | OneHotEncoder(handle_unknown='ignore') |
| preprocessor__num__memory | |
| preprocessor__num__steps | [('imputer', SimpleImputer(strategy='median')), ('std_scaler', StandardScaler())] |
| preprocessor__num__verbose | False |
| preprocessor__num__imputer | SimpleImputer(strategy='median') |
| preprocessor__num__std_scaler | StandardScaler() |
| preprocessor__num__imputer__add_indicator | False |
| preprocessor__num__imputer__copy | True |
| preprocessor__num__imputer__fill_value | |
| preprocessor__num__imputer__missing_values | nan |
| preprocessor__num__imputer__strategy | median |
| preprocessor__num__imputer__verbose | 0 |
| preprocessor__num__std_scaler__copy | True |
| preprocessor__num__std_scaler__with_mean | True |
| preprocessor__num__std_scaler__with_std | True |
| preprocessor__cat__categories | auto |
| preprocessor__cat__drop | |
| preprocessor__cat__dtype | <class 'numpy.float64'> |
| preprocessor__cat__handle_unknown | ignore |
| preprocessor__cat__sparse | True |
| classifier__C | 1.0 |
| classifier__class_weight | balanced |
| classifier__dual | False |
| classifier__fit_intercept | True |
| classifier__intercept_scaling | 1 |
| classifier__l1_ratio | |
| classifier__max_iter | 300 |
| classifier__multi_class | auto |
| classifier__n_jobs | |
| classifier__penalty | l2 |
| classifier__random_state | |
| classifier__solver | lbfgs |
| classifier__tol | 0.0001 |
| classifier__verbose | 0 |
| classifier__warm_start | False |
Model Plot
The model plot is below.
Pipeline(steps=[('preprocessor',ColumnTransformer(transformers=[('num',Pipeline(steps=[('imputer',SimpleImputer(strategy='median')),('std_scaler',StandardScaler())]),['MonthlyCharges','TotalCharges', 'tenure']),('cat',OneHotEncoder(handle_unknown='ignore'),['SeniorCitizen', 'gender','Partner', 'Dependents','PhoneService','MultipleLines','InternetService','OnlineSecurity','OnlineBackup','DeviceProtection','TechSupport', 'StreamingTV','StreamingMovies','Contract','PaperlessBilling','PaymentMethod'])])),('classifier',LogisticRegression(class_weight='balanced', max_iter=300))])Please rerun this cell to show the HTML repr or trust the notebook.Pipeline(steps=[('preprocessor',ColumnTransformer(transformers=[('num',Pipeline(steps=[('imputer',SimpleImputer(strategy='median')),('std_scaler',StandardScaler())]),['MonthlyCharges','TotalCharges', 'tenure']),('cat',OneHotEncoder(handle_unknown='ignore'),['SeniorCitizen', 'gender','Partner', 'Dependents','PhoneService','MultipleLines','InternetService','OnlineSecurity','OnlineBackup','DeviceProtection','TechSupport', 'StreamingTV','StreamingMovies','Contract','PaperlessBilling','PaymentMethod'])])),('classifier',LogisticRegression(class_weight='balanced', max_iter=300))])ColumnTransformer(transformers=[('num',Pipeline(steps=[('imputer',SimpleImputer(strategy='median')),('std_scaler',StandardScaler())]),['MonthlyCharges', 'TotalCharges', 'tenure']),('cat', OneHotEncoder(handle_unknown='ignore'),['SeniorCitizen', 'gender', 'Partner','Dependents', 'PhoneService', 'MultipleLines','InternetService', 'OnlineSecurity','OnlineBackup', 'DeviceProtection','TechSupport', 'StreamingTV','StreamingMovies', 'Contract','PaperlessBilling', 'PaymentMethod'])])['MonthlyCharges', 'TotalCharges', 'tenure']
SimpleImputer(strategy='median')
StandardScaler()
['SeniorCitizen', 'gender', 'Partner', 'Dependents', 'PhoneService', 'MultipleLines', 'InternetService', 'OnlineSecurity', 'OnlineBackup', 'DeviceProtection', 'TechSupport', 'StreamingTV', 'StreamingMovies', 'Contract', 'PaperlessBilling', 'PaymentMethod']
OneHotEncoder(handle_unknown='ignore')
LogisticRegression(class_weight='balanced', max_iter=300)
Evaluation Results
You can find the details about evaluation process and the evaluation results.
| Metric | Value |
|---|---|
| accuracy | 0.730305 |
| f1 score | 0.730305 |
How to Get Started with the Model
Use the code below to get started with the model.
import joblib
import json
import pandas as pd
clf = joblib.load(churn.pkl)
with open("config.json") as f:
config = json.load(f)
clf.predict(pd.DataFrame.from_dict(config["sklearn"]["example_input"]))
Model Card Authors
This model card is written by following authors:
skops_user
Model Card Contact
You can contact the model card authors through following channels: [More Information Needed]
Citation
Below you can find information related to citation.
BibTeX:
bibtex
@inproceedings{...,year={2020}}
Additional Content
confusion_matrix
- Downloads last month
- -
