Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -0
src/streamlit_app.py
CHANGED
|
@@ -40,6 +40,13 @@ if menu == "Train Model":
|
|
| 40 |
# y = data[target_column]
|
| 41 |
|
| 42 |
# input features
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
X = data.drop('Response', axis = 1)
|
| 44 |
# output labels
|
| 45 |
y = data['Response']
|
|
|
|
| 40 |
# y = data[target_column]
|
| 41 |
|
| 42 |
# input features
|
| 43 |
+
# Automatically exclude identifier columns
|
| 44 |
+
exclude_columns = ['Customer', 'Policy', 'Policy Number', 'Response']
|
| 45 |
+
feature_columns = [col for col in data.columns if col not in exclude_columns]
|
| 46 |
+
X = pd.get_dummies(data[feature_columns])
|
| 47 |
+
y = data['Response']
|
| 48 |
+
|
| 49 |
+
|
| 50 |
X = data.drop('Response', axis = 1)
|
| 51 |
# output labels
|
| 52 |
y = data['Response']
|