We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d21d503 commit fe8f01eCopy full SHA for fe8f01e
data_modeler.py
@@ -94,11 +94,13 @@ def run_rf(split, **kwargs):
94
rf.fit(X_train_resampled, y_train_resampled)
95
return rf
96
97
-def run_all():
98
- X_category = df.select_dtypes(include='category')
+def run_all(data):
+ X_category = data.select_dtypes(include='category')
99
+ y = data.arstmade
100
X = fill_NaNs(X_category)
101
X = categorical_encoder(X)
102
split = load_split(X, y, stratify=y)
103
clf = run_rf(split, max_depth=2)
- clf.feature_importances_
104
- balanced_accuracy_score(split['y_test'], clf.predict['X_test'])
+ print(clf.feature_importances_)
105
+ print(balanced_accuracy_score(split['y_test'], clf.predict['X_test']))
106
+ return split, clf
0 commit comments