rajistics commited on
Commit
d426f8f
1 Parent(s): 6ea45f3

pushing files to the repo from the example!

Browse files
Files changed (1) hide show
  1. README.md +13 -43
README.md CHANGED
@@ -5,6 +5,7 @@ tags:
5
  - sklearn
6
  - skops
7
  - tabular-classification
 
8
  widget:
9
  structuredData:
10
  Contract:
@@ -105,46 +106,18 @@ The model is trained with below hyperparameters.
105
  | Hyperparameter | Value |
106
  |--------------------------------------------|-----------------------------------------------------------------------------------|
107
  | memory | |
108
- | steps | [('preprocessor', ColumnTransformer(transformers=[('num',
109
- Pipeline(steps=[('imputer',
110
- SimpleImputer(strategy='median')),
111
- ('std_scaler',
112
- StandardScaler())]),
113
- ['MonthlyCharges', 'TotalCharges', 'tenure']),
114
- ('cat', OneHotEncoder(handle_unknown='ignore'),
115
- ['SeniorCitizen', 'gender', 'Partner',
116
- 'Dependents', 'PhoneService', 'MultipleLines',
117
- 'InternetService', 'OnlineSecurity',
118
- 'OnlineBackup', 'DeviceProtection',
119
- 'TechSupport', 'StreamingTV',
120
- 'StreamingMovies', 'Contract',
121
- 'PaperlessBilling', 'PaymentMethod'])])), ('classifier', LogisticRegression(class_weight='balanced', max_iter=300))] |
122
  | verbose | False |
123
- | preprocessor | ColumnTransformer(transformers=[('num',
124
- Pipeline(steps=[('imputer',
125
- SimpleImputer(strategy='median')),
126
- ('std_scaler',
127
- StandardScaler())]),
128
- ['MonthlyCharges', 'TotalCharges', 'tenure']),
129
- ('cat', OneHotEncoder(handle_unknown='ignore'),
130
- ['SeniorCitizen', 'gender', 'Partner',
131
- 'Dependents', 'PhoneService', 'MultipleLines',
132
- 'InternetService', 'OnlineSecurity',
133
- 'OnlineBackup', 'DeviceProtection',
134
- 'TechSupport', 'StreamingTV',
135
- 'StreamingMovies', 'Contract',
136
- 'PaperlessBilling', 'PaymentMethod'])]) |
137
  | classifier | LogisticRegression(class_weight='balanced', max_iter=300) |
138
  | preprocessor__n_jobs | |
139
  | preprocessor__remainder | drop |
140
  | preprocessor__sparse_threshold | 0.3 |
141
  | preprocessor__transformer_weights | |
142
- | preprocessor__transformers | [('num', Pipeline(steps=[('imputer', SimpleImputer(strategy='median')),
143
- ('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'])] |
144
  | preprocessor__verbose | False |
145
  | preprocessor__verbose_feature_names_out | True |
146
- | preprocessor__num | Pipeline(steps=[('imputer', SimpleImputer(strategy='median')),
147
- ('std_scaler', StandardScaler())]) |
148
  | preprocessor__cat | OneHotEncoder(handle_unknown='ignore') |
149
  | preprocessor__num__memory | |
150
  | preprocessor__num__steps | [('imputer', SimpleImputer(strategy='median')), ('std_scaler', StandardScaler())] |
@@ -187,7 +160,7 @@ The model is trained with below hyperparameters.
187
 
188
  The model plot is below.
189
 
190
- <style>#sk-459e3303-a36f-477f-9be8-a83d3277a824 {color: black;background-color: white;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 pre{padding: 0;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-toggleable {background-color: white;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 label.sk-toggleable__label-arrow:before {content: "▸";float: left;margin-right: 0.25em;color: #696969;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: "▾";}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-estimator {font-family: monospace;background-color: #f0f8ff;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-estimator:hover {background-color: #d4ebff;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-parallel-item::after {content: "";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-serial::before {content: "";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 2em;bottom: 0;left: 50%;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-item {z-index: 1;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-parallel::before {content: "";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 2em;bottom: 0;left: 50%;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-parallel-item {display: flex;flex-direction: column;position: relative;background-color: white;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-parallel-item:only-child::after {width: 0;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: white;position: relative;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-label label {font-family: monospace;font-weight: bold;background-color: white;display: inline-block;line-height: 1.2em;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-label-container {position: relative;z-index: 2;text-align: center;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }` but bootstrap.min.css set `[hidden] { display: none !important; }` so we also need the `!important` here to be able to override the default hidden behavior on the sphinx rendered scikit-learn.org. See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;}#sk-459e3303-a36f-477f-9be8-a83d3277a824 div.sk-text-repr-fallback {display: none;}</style><div id="sk-459e3303-a36f-477f-9be8-a83d3277a824" class="sk-top-container"><div class="sk-text-repr-fallback"><pre>Pipeline(steps=[(&#x27;preprocessor&#x27;,ColumnTransformer(transformers=[(&#x27;num&#x27;,Pipeline(steps=[(&#x27;imputer&#x27;,SimpleImputer(strategy=&#x27;median&#x27;)),(&#x27;std_scaler&#x27;,StandardScaler())]),[&#x27;MonthlyCharges&#x27;,&#x27;TotalCharges&#x27;, &#x27;tenure&#x27;]),(&#x27;cat&#x27;,OneHotEncoder(handle_unknown=&#x27;ignore&#x27;),[&#x27;SeniorCitizen&#x27;, &#x27;gender&#x27;,&#x27;Partner&#x27;, &#x27;Dependents&#x27;,&#x27;PhoneService&#x27;,&#x27;MultipleLines&#x27;,&#x27;InternetService&#x27;,&#x27;OnlineSecurity&#x27;,&#x27;OnlineBackup&#x27;,&#x27;DeviceProtection&#x27;,&#x27;TechSupport&#x27;, &#x27;StreamingTV&#x27;,&#x27;StreamingMovies&#x27;,&#x27;Contract&#x27;,&#x27;PaperlessBilling&#x27;,&#x27;PaymentMethod&#x27;])])),(&#x27;classifier&#x27;,LogisticRegression(class_weight=&#x27;balanced&#x27;, max_iter=300))])</pre><b>Please rerun this cell to show the HTML repr or trust the notebook.</b></div><div class="sk-container" hidden><div class="sk-item sk-dashed-wrapped"><div class="sk-label-container"><div class="sk-label sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="566c17ff-b86a-4477-87fa-7072c594f96a" type="checkbox" ><label for="566c17ff-b86a-4477-87fa-7072c594f96a" class="sk-toggleable__label sk-toggleable__label-arrow">Pipeline</label><div class="sk-toggleable__content"><pre>Pipeline(steps=[(&#x27;preprocessor&#x27;,ColumnTransformer(transformers=[(&#x27;num&#x27;,Pipeline(steps=[(&#x27;imputer&#x27;,SimpleImputer(strategy=&#x27;median&#x27;)),(&#x27;std_scaler&#x27;,StandardScaler())]),[&#x27;MonthlyCharges&#x27;,&#x27;TotalCharges&#x27;, &#x27;tenure&#x27;]),(&#x27;cat&#x27;,OneHotEncoder(handle_unknown=&#x27;ignore&#x27;),[&#x27;SeniorCitizen&#x27;, &#x27;gender&#x27;,&#x27;Partner&#x27;, &#x27;Dependents&#x27;,&#x27;PhoneService&#x27;,&#x27;MultipleLines&#x27;,&#x27;InternetService&#x27;,&#x27;OnlineSecurity&#x27;,&#x27;OnlineBackup&#x27;,&#x27;DeviceProtection&#x27;,&#x27;TechSupport&#x27;, &#x27;StreamingTV&#x27;,&#x27;StreamingMovies&#x27;,&#x27;Contract&#x27;,&#x27;PaperlessBilling&#x27;,&#x27;PaymentMethod&#x27;])])),(&#x27;classifier&#x27;,LogisticRegression(class_weight=&#x27;balanced&#x27;, max_iter=300))])</pre></div></div></div><div class="sk-serial"><div class="sk-item sk-dashed-wrapped"><div class="sk-label-container"><div class="sk-label sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="ea3ce53d-6a62-45ee-a94f-65a5fd9a0c91" type="checkbox" ><label for="ea3ce53d-6a62-45ee-a94f-65a5fd9a0c91" class="sk-toggleable__label sk-toggleable__label-arrow">preprocessor: ColumnTransformer</label><div class="sk-toggleable__content"><pre>ColumnTransformer(transformers=[(&#x27;num&#x27;,Pipeline(steps=[(&#x27;imputer&#x27;,SimpleImputer(strategy=&#x27;median&#x27;)),(&#x27;std_scaler&#x27;,StandardScaler())]),[&#x27;MonthlyCharges&#x27;, &#x27;TotalCharges&#x27;, &#x27;tenure&#x27;]),(&#x27;cat&#x27;, OneHotEncoder(handle_unknown=&#x27;ignore&#x27;),[&#x27;SeniorCitizen&#x27;, &#x27;gender&#x27;, &#x27;Partner&#x27;,&#x27;Dependents&#x27;, &#x27;PhoneService&#x27;, &#x27;MultipleLines&#x27;,&#x27;InternetService&#x27;, &#x27;OnlineSecurity&#x27;,&#x27;OnlineBackup&#x27;, &#x27;DeviceProtection&#x27;,&#x27;TechSupport&#x27;, &#x27;StreamingTV&#x27;,&#x27;StreamingMovies&#x27;, &#x27;Contract&#x27;,&#x27;PaperlessBilling&#x27;, &#x27;PaymentMethod&#x27;])])</pre></div></div></div><div class="sk-parallel"><div class="sk-parallel-item"><div class="sk-item"><div class="sk-label-container"><div class="sk-label sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="a20cd11e-3fb6-49ad-9a0e-a753e490fcd5" type="checkbox" ><label for="a20cd11e-3fb6-49ad-9a0e-a753e490fcd5" class="sk-toggleable__label sk-toggleable__label-arrow">num</label><div class="sk-toggleable__content"><pre>[&#x27;MonthlyCharges&#x27;, &#x27;TotalCharges&#x27;, &#x27;tenure&#x27;]</pre></div></div></div><div class="sk-serial"><div class="sk-item"><div class="sk-serial"><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="c47d1b33-32bd-4fb4-ae4f-ff45d68c33bf" type="checkbox" ><label for="c47d1b33-32bd-4fb4-ae4f-ff45d68c33bf" class="sk-toggleable__label sk-toggleable__label-arrow">SimpleImputer</label><div class="sk-toggleable__content"><pre>SimpleImputer(strategy=&#x27;median&#x27;)</pre></div></div></div><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="a5419c35-03e3-48c1-9250-5eedc50f5221" type="checkbox" ><label for="a5419c35-03e3-48c1-9250-5eedc50f5221" class="sk-toggleable__label sk-toggleable__label-arrow">StandardScaler</label><div class="sk-toggleable__content"><pre>StandardScaler()</pre></div></div></div></div></div></div></div></div><div class="sk-parallel-item"><div class="sk-item"><div class="sk-label-container"><div class="sk-label sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="fede319e-13b1-4e7c-aef1-e079c4f70e29" type="checkbox" ><label for="fede319e-13b1-4e7c-aef1-e079c4f70e29" class="sk-toggleable__label sk-toggleable__label-arrow">cat</label><div class="sk-toggleable__content"><pre>[&#x27;SeniorCitizen&#x27;, &#x27;gender&#x27;, &#x27;Partner&#x27;, &#x27;Dependents&#x27;, &#x27;PhoneService&#x27;, &#x27;MultipleLines&#x27;, &#x27;InternetService&#x27;, &#x27;OnlineSecurity&#x27;, &#x27;OnlineBackup&#x27;, &#x27;DeviceProtection&#x27;, &#x27;TechSupport&#x27;, &#x27;StreamingTV&#x27;, &#x27;StreamingMovies&#x27;, &#x27;Contract&#x27;, &#x27;PaperlessBilling&#x27;, &#x27;PaymentMethod&#x27;]</pre></div></div></div><div class="sk-serial"><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="861a3701-0fb9-4735-916c-a7566a2a2de7" type="checkbox" ><label for="861a3701-0fb9-4735-916c-a7566a2a2de7" class="sk-toggleable__label sk-toggleable__label-arrow">OneHotEncoder</label><div class="sk-toggleable__content"><pre>OneHotEncoder(handle_unknown=&#x27;ignore&#x27;)</pre></div></div></div></div></div></div></div></div><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="e1ec4529-26c8-413b-b53c-0e06543d5ad5" type="checkbox" ><label for="e1ec4529-26c8-413b-b53c-0e06543d5ad5" class="sk-toggleable__label sk-toggleable__label-arrow">LogisticRegression</label><div class="sk-toggleable__content"><pre>LogisticRegression(class_weight=&#x27;balanced&#x27;, max_iter=300)</pre></div></div></div></div></div></div></div>
191
 
192
  ## Evaluation Results
193
 
@@ -204,19 +177,16 @@ You can find the details about evaluation process and the evaluation results.
204
 
205
  Use the code below to get started with the model.
206
 
207
- <details>
208
- <summary> Click to expand </summary>
209
-
210
  ```python
211
- import pickle
212
- with open(dtc_pkl_filename, 'rb') as file:
213
- clf = pickle.load(file)
 
 
 
 
214
  ```
215
 
216
- </details>
217
-
218
-
219
-
220
 
221
  # Model Card Authors
222
 
 
5
  - sklearn
6
  - skops
7
  - tabular-classification
8
+ model_file: churn.pkl
9
  widget:
10
  structuredData:
11
  Contract:
 
106
  | Hyperparameter | Value |
107
  |--------------------------------------------|-----------------------------------------------------------------------------------|
108
  | memory | |
109
+ | steps | [('preprocessor', ColumnTransformer(transformers=[('num',<br /> Pipeline(steps=[('imputer',<br /> SimpleImputer(strategy='median')),<br /> ('std_scaler',<br /> StandardScaler())]),<br /> ['MonthlyCharges', 'TotalCharges', 'tenure']),<br /> ('cat', OneHotEncoder(handle_unknown='ignore'),<br /> ['SeniorCitizen', 'gender', 'Partner',<br /> 'Dependents', 'PhoneService', 'MultipleLines',<br /> 'InternetService', 'OnlineSecurity',<br /> 'OnlineBackup', 'DeviceProtection',<br /> 'TechSupport', 'StreamingTV',<br /> 'StreamingMovies', 'Contract',<br /> 'PaperlessBilling', 'PaymentMethod'])])), ('classifier', LogisticRegression(class_weight='balanced', max_iter=300))] |
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  | verbose | False |
111
+ | preprocessor | ColumnTransformer(transformers=[('num',<br /> Pipeline(steps=[('imputer',<br /> SimpleImputer(strategy='median')),<br /> ('std_scaler',<br /> StandardScaler())]),<br /> ['MonthlyCharges', 'TotalCharges', 'tenure']),<br /> ('cat', OneHotEncoder(handle_unknown='ignore'),<br /> ['SeniorCitizen', 'gender', 'Partner',<br /> 'Dependents', 'PhoneService', 'MultipleLines',<br /> 'InternetService', 'OnlineSecurity',<br /> 'OnlineBackup', 'DeviceProtection',<br /> 'TechSupport', 'StreamingTV',<br /> 'StreamingMovies', 'Contract',<br /> 'PaperlessBilling', 'PaymentMethod'])]) |
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  | classifier | LogisticRegression(class_weight='balanced', max_iter=300) |
113
  | preprocessor__n_jobs | |
114
  | preprocessor__remainder | drop |
115
  | preprocessor__sparse_threshold | 0.3 |
116
  | preprocessor__transformer_weights | |
117
+ | preprocessor__transformers | [('num', Pipeline(steps=[('imputer', SimpleImputer(strategy='median')),<br /> ('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'])] |
 
118
  | preprocessor__verbose | False |
119
  | preprocessor__verbose_feature_names_out | True |
120
+ | preprocessor__num | Pipeline(steps=[('imputer', SimpleImputer(strategy='median')),<br /> ('std_scaler', StandardScaler())]) |
 
121
  | preprocessor__cat | OneHotEncoder(handle_unknown='ignore') |
122
  | preprocessor__num__memory | |
123
  | preprocessor__num__steps | [('imputer', SimpleImputer(strategy='median')), ('std_scaler', StandardScaler())] |
 
160
 
161
  The model plot is below.
162
 
163
+ <style>#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b {color: black;background-color: white;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b pre{padding: 0;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-toggleable {background-color: white;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b label.sk-toggleable__label-arrow:before {content: "▸";float: left;margin-right: 0.25em;color: #696969;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: "▾";}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-estimator {font-family: monospace;background-color: #f0f8ff;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-estimator:hover {background-color: #d4ebff;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-parallel-item::after {content: "";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-serial::before {content: "";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 2em;bottom: 0;left: 50%;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-item {z-index: 1;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-parallel::before {content: "";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 2em;bottom: 0;left: 50%;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-parallel-item {display: flex;flex-direction: column;position: relative;background-color: white;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-parallel-item:only-child::after {width: 0;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: white;position: relative;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-label label {font-family: monospace;font-weight: bold;background-color: white;display: inline-block;line-height: 1.2em;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-label-container {position: relative;z-index: 2;text-align: center;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }` but bootstrap.min.css set `[hidden] { display: none !important; }` so we also need the `!important` here to be able to override the default hidden behavior on the sphinx rendered scikit-learn.org. See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;}#sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b div.sk-text-repr-fallback {display: none;}</style><div id="sk-2f8511ba-a0db-44ab-9923-e3dacad6ed8b" class="sk-top-container" style="overflow: auto;"><div class="sk-text-repr-fallback"><pre>Pipeline(steps=[(&#x27;preprocessor&#x27;,ColumnTransformer(transformers=[(&#x27;num&#x27;,Pipeline(steps=[(&#x27;imputer&#x27;,SimpleImputer(strategy=&#x27;median&#x27;)),(&#x27;std_scaler&#x27;,StandardScaler())]),[&#x27;MonthlyCharges&#x27;,&#x27;TotalCharges&#x27;, &#x27;tenure&#x27;]),(&#x27;cat&#x27;,OneHotEncoder(handle_unknown=&#x27;ignore&#x27;),[&#x27;SeniorCitizen&#x27;, &#x27;gender&#x27;,&#x27;Partner&#x27;, &#x27;Dependents&#x27;,&#x27;PhoneService&#x27;,&#x27;MultipleLines&#x27;,&#x27;InternetService&#x27;,&#x27;OnlineSecurity&#x27;,&#x27;OnlineBackup&#x27;,&#x27;DeviceProtection&#x27;,&#x27;TechSupport&#x27;, &#x27;StreamingTV&#x27;,&#x27;StreamingMovies&#x27;,&#x27;Contract&#x27;,&#x27;PaperlessBilling&#x27;,&#x27;PaymentMethod&#x27;])])),(&#x27;classifier&#x27;,LogisticRegression(class_weight=&#x27;balanced&#x27;, max_iter=300))])</pre><b>Please rerun this cell to show the HTML repr or trust the notebook.</b></div><div class="sk-container" hidden><div class="sk-item sk-dashed-wrapped"><div class="sk-label-container"><div class="sk-label sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="e40df1ca-7c12-4af8-9eab-78b223be6031" type="checkbox" ><label for="e40df1ca-7c12-4af8-9eab-78b223be6031" class="sk-toggleable__label sk-toggleable__label-arrow">Pipeline</label><div class="sk-toggleable__content"><pre>Pipeline(steps=[(&#x27;preprocessor&#x27;,ColumnTransformer(transformers=[(&#x27;num&#x27;,Pipeline(steps=[(&#x27;imputer&#x27;,SimpleImputer(strategy=&#x27;median&#x27;)),(&#x27;std_scaler&#x27;,StandardScaler())]),[&#x27;MonthlyCharges&#x27;,&#x27;TotalCharges&#x27;, &#x27;tenure&#x27;]),(&#x27;cat&#x27;,OneHotEncoder(handle_unknown=&#x27;ignore&#x27;),[&#x27;SeniorCitizen&#x27;, &#x27;gender&#x27;,&#x27;Partner&#x27;, &#x27;Dependents&#x27;,&#x27;PhoneService&#x27;,&#x27;MultipleLines&#x27;,&#x27;InternetService&#x27;,&#x27;OnlineSecurity&#x27;,&#x27;OnlineBackup&#x27;,&#x27;DeviceProtection&#x27;,&#x27;TechSupport&#x27;, &#x27;StreamingTV&#x27;,&#x27;StreamingMovies&#x27;,&#x27;Contract&#x27;,&#x27;PaperlessBilling&#x27;,&#x27;PaymentMethod&#x27;])])),(&#x27;classifier&#x27;,LogisticRegression(class_weight=&#x27;balanced&#x27;, max_iter=300))])</pre></div></div></div><div class="sk-serial"><div class="sk-item sk-dashed-wrapped"><div class="sk-label-container"><div class="sk-label sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="5ab95faf-6b5c-4c92-b62a-e6e89ff34e98" type="checkbox" ><label for="5ab95faf-6b5c-4c92-b62a-e6e89ff34e98" class="sk-toggleable__label sk-toggleable__label-arrow">preprocessor: ColumnTransformer</label><div class="sk-toggleable__content"><pre>ColumnTransformer(transformers=[(&#x27;num&#x27;,Pipeline(steps=[(&#x27;imputer&#x27;,SimpleImputer(strategy=&#x27;median&#x27;)),(&#x27;std_scaler&#x27;,StandardScaler())]),[&#x27;MonthlyCharges&#x27;, &#x27;TotalCharges&#x27;, &#x27;tenure&#x27;]),(&#x27;cat&#x27;, OneHotEncoder(handle_unknown=&#x27;ignore&#x27;),[&#x27;SeniorCitizen&#x27;, &#x27;gender&#x27;, &#x27;Partner&#x27;,&#x27;Dependents&#x27;, &#x27;PhoneService&#x27;, &#x27;MultipleLines&#x27;,&#x27;InternetService&#x27;, &#x27;OnlineSecurity&#x27;,&#x27;OnlineBackup&#x27;, &#x27;DeviceProtection&#x27;,&#x27;TechSupport&#x27;, &#x27;StreamingTV&#x27;,&#x27;StreamingMovies&#x27;, &#x27;Contract&#x27;,&#x27;PaperlessBilling&#x27;, &#x27;PaymentMethod&#x27;])])</pre></div></div></div><div class="sk-parallel"><div class="sk-parallel-item"><div class="sk-item"><div class="sk-label-container"><div class="sk-label sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="b35864d8-108a-401d-b798-3252dc36fd13" type="checkbox" ><label for="b35864d8-108a-401d-b798-3252dc36fd13" class="sk-toggleable__label sk-toggleable__label-arrow">num</label><div class="sk-toggleable__content"><pre>[&#x27;MonthlyCharges&#x27;, &#x27;TotalCharges&#x27;, &#x27;tenure&#x27;]</pre></div></div></div><div class="sk-serial"><div class="sk-item"><div class="sk-serial"><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="7dbe5c20-0699-4796-abea-d65898c34ddb" type="checkbox" ><label for="7dbe5c20-0699-4796-abea-d65898c34ddb" class="sk-toggleable__label sk-toggleable__label-arrow">SimpleImputer</label><div class="sk-toggleable__content"><pre>SimpleImputer(strategy=&#x27;median&#x27;)</pre></div></div></div><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="92bcdb13-bd97-41ad-bb4e-069d6ca8dabc" type="checkbox" ><label for="92bcdb13-bd97-41ad-bb4e-069d6ca8dabc" class="sk-toggleable__label sk-toggleable__label-arrow">StandardScaler</label><div class="sk-toggleable__content"><pre>StandardScaler()</pre></div></div></div></div></div></div></div></div><div class="sk-parallel-item"><div class="sk-item"><div class="sk-label-container"><div class="sk-label sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="56fad41f-b37e-4d4b-a3fa-ae0d495ae27c" type="checkbox" ><label for="56fad41f-b37e-4d4b-a3fa-ae0d495ae27c" class="sk-toggleable__label sk-toggleable__label-arrow">cat</label><div class="sk-toggleable__content"><pre>[&#x27;SeniorCitizen&#x27;, &#x27;gender&#x27;, &#x27;Partner&#x27;, &#x27;Dependents&#x27;, &#x27;PhoneService&#x27;, &#x27;MultipleLines&#x27;, &#x27;InternetService&#x27;, &#x27;OnlineSecurity&#x27;, &#x27;OnlineBackup&#x27;, &#x27;DeviceProtection&#x27;, &#x27;TechSupport&#x27;, &#x27;StreamingTV&#x27;, &#x27;StreamingMovies&#x27;, &#x27;Contract&#x27;, &#x27;PaperlessBilling&#x27;, &#x27;PaymentMethod&#x27;]</pre></div></div></div><div class="sk-serial"><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="3365f471-1565-4f85-bac0-7c318e8bf004" type="checkbox" ><label for="3365f471-1565-4f85-bac0-7c318e8bf004" class="sk-toggleable__label sk-toggleable__label-arrow">OneHotEncoder</label><div class="sk-toggleable__content"><pre>OneHotEncoder(handle_unknown=&#x27;ignore&#x27;)</pre></div></div></div></div></div></div></div></div><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="d1307b74-3b6c-4b20-9be7-bc8da9a06cea" type="checkbox" ><label for="d1307b74-3b6c-4b20-9be7-bc8da9a06cea" class="sk-toggleable__label sk-toggleable__label-arrow">LogisticRegression</label><div class="sk-toggleable__content"><pre>LogisticRegression(class_weight=&#x27;balanced&#x27;, max_iter=300)</pre></div></div></div></div></div></div></div>
164
 
165
  ## Evaluation Results
166
 
 
177
 
178
  Use the code below to get started with the model.
179
 
 
 
 
180
  ```python
181
+ import joblib
182
+ import json
183
+ import pandas as pd
184
+ clf = joblib.load(churn.pkl)
185
+ with open("config.json") as f:
186
+ config = json.load(f)
187
+ clf.predict(pd.DataFrame.from_dict(config["sklearn"]["example_input"]))
188
  ```
189
 
 
 
 
 
190
 
191
  # Model Card Authors
192