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

pushing files to the repo from the example!

Browse files
Files changed (4) hide show
  1. README.md +44 -16
  2. churn.pkl +2 -2
  3. config.json +1 -1
  4. confusion_matrix.png +0 -0
README.md CHANGED
@@ -5,7 +5,6 @@ tags:
5
  - sklearn
6
  - skops
7
  - tabular-classification
8
- model_file: churn.pkl
9
  widget:
10
  structuredData:
11
  Contract:
@@ -106,18 +105,46 @@ The model is trained with below hyperparameters.
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())] |
@@ -129,7 +156,7 @@ The model is trained with below hyperparameters.
129
  | preprocessor__num__imputer__fill_value | |
130
  | preprocessor__num__imputer__missing_values | nan |
131
  | preprocessor__num__imputer__strategy | median |
132
- | preprocessor__num__imputer__verbose | deprecated |
133
  | preprocessor__num__std_scaler__copy | True |
134
  | preprocessor__num__std_scaler__with_mean | True |
135
  | preprocessor__num__std_scaler__with_std | True |
@@ -137,8 +164,6 @@ The model is trained with below hyperparameters.
137
  | preprocessor__cat__drop | |
138
  | preprocessor__cat__dtype | <class 'numpy.float64'> |
139
  | preprocessor__cat__handle_unknown | ignore |
140
- | preprocessor__cat__max_categories | |
141
- | preprocessor__cat__min_frequency | |
142
  | preprocessor__cat__sparse | True |
143
  | classifier__C | 1.0 |
144
  | classifier__class_weight | balanced |
@@ -162,7 +187,7 @@ The model is trained with below hyperparameters.
162
 
163
  The model plot is below.
164
 
165
- <style>#sk-container-id-1 {color: black;background-color: white;}#sk-container-id-1 pre{padding: 0;}#sk-container-id-1 div.sk-toggleable {background-color: white;}#sk-container-id-1 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-container-id-1 label.sk-toggleable__label-arrow:before {content: "▸";float: left;margin-right: 0.25em;color: #696969;}#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-container-id-1 div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-container-id-1 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-container-id-1 div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: "▾";}#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 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-container-id-1 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-container-id-1 div.sk-estimator:hover {background-color: #d4ebff;}#sk-container-id-1 div.sk-parallel-item::after {content: "";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-serial::before {content: "";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: 0;}#sk-container-id-1 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;position: relative;}#sk-container-id-1 div.sk-item {position: relative;z-index: 1;}#sk-container-id-1 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;position: relative;}#sk-container-id-1 div.sk-item::before, #sk-container-id-1 div.sk-parallel-item::before {content: "";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: -1;}#sk-container-id-1 div.sk-parallel-item {display: flex;flex-direction: column;z-index: 1;position: relative;background-color: white;}#sk-container-id-1 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-container-id-1 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-container-id-1 div.sk-parallel-item:only-child::after {width: 0;}#sk-container-id-1 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;}#sk-container-id-1 div.sk-label label {font-family: monospace;font-weight: bold;display: inline-block;line-height: 1.2em;}#sk-container-id-1 div.sk-label-container {text-align: center;}#sk-container-id-1 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-container-id-1 div.sk-text-repr-fallback {display: none;}</style><div id="sk-container-id-1" 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>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</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="sk-estimator-id-1" type="checkbox" ><label for="sk-estimator-id-1" 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="sk-estimator-id-2" type="checkbox" ><label for="sk-estimator-id-2" 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="sk-estimator-id-3" type="checkbox" ><label for="sk-estimator-id-3" 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="sk-estimator-id-4" type="checkbox" ><label for="sk-estimator-id-4" 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="sk-estimator-id-5" type="checkbox" ><label for="sk-estimator-id-5" 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="sk-estimator-id-6" type="checkbox" ><label for="sk-estimator-id-6" 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="sk-estimator-id-7" type="checkbox" ><label for="sk-estimator-id-7" 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="sk-estimator-id-8" type="checkbox" ><label for="sk-estimator-id-8" 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>
166
 
167
  ## Evaluation Results
168
 
@@ -179,16 +204,19 @@ You can find the details about evaluation process and the evaluation results.
179
 
180
  Use the code below to get started with the model.
181
 
 
 
 
182
  ```python
183
- import joblib
184
- import json
185
- import pandas as pd
186
- clf = joblib.load(churn.pkl)
187
- with open("config.json") as f:
188
- config = json.load(f)
189
- clf.predict(pd.DataFrame.from_dict(config["sklearn"]["example_input"]))
190
  ```
191
 
 
 
 
 
192
 
193
  # Model Card Authors
194
 
 
5
  - sklearn
6
  - skops
7
  - tabular-classification
 
8
  widget:
9
  structuredData:
10
  Contract:
 
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())] |
 
156
  | preprocessor__num__imputer__fill_value | |
157
  | preprocessor__num__imputer__missing_values | nan |
158
  | preprocessor__num__imputer__strategy | median |
159
+ | preprocessor__num__imputer__verbose | 0 |
160
  | preprocessor__num__std_scaler__copy | True |
161
  | preprocessor__num__std_scaler__with_mean | True |
162
  | preprocessor__num__std_scaler__with_std | True |
 
164
  | preprocessor__cat__drop | |
165
  | preprocessor__cat__dtype | <class 'numpy.float64'> |
166
  | preprocessor__cat__handle_unknown | ignore |
 
 
167
  | preprocessor__cat__sparse | True |
168
  | classifier__C | 1.0 |
169
  | classifier__class_weight | balanced |
 
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
 
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
 
churn.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8b11dada9e639d7770537daf493675f1c499516c362a9e233bfee765ab3a5bed
3
- size 4439
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91d55154bc5efbad522284cc8aca6fd455155b5b909f0d2c57486246bfc58db5
3
+ size 5574
config.json CHANGED
@@ -22,7 +22,7 @@
22
  "TotalCharges"
23
  ],
24
  "environment": [
25
- "scikit-learn=1.1.1"
26
  ],
27
  "example_input": {
28
  "Contract": [
 
22
  "TotalCharges"
23
  ],
24
  "environment": [
25
+ "scikit-learn=1.0.2"
26
  ],
27
  "example_input": {
28
  "Contract": [
confusion_matrix.png CHANGED