Skip to content

Commit fe8f01e

Browse files
committed
untested run_all funciton
1 parent d21d503 commit fe8f01e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

data_modeler.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,13 @@ def run_rf(split, **kwargs):
9494
rf.fit(X_train_resampled, y_train_resampled)
9595
return rf
9696

97-
def run_all():
98-
X_category = df.select_dtypes(include='category')
97+
def run_all(data):
98+
X_category = data.select_dtypes(include='category')
99+
y = data.arstmade
99100
X = fill_NaNs(X_category)
100101
X = categorical_encoder(X)
101102
split = load_split(X, y, stratify=y)
102103
clf = run_rf(split, max_depth=2)
103-
clf.feature_importances_
104-
balanced_accuracy_score(split['y_test'], clf.predict['X_test'])
104+
print(clf.feature_importances_)
105+
print(balanced_accuracy_score(split['y_test'], clf.predict['X_test']))
106+
return split, clf

0 commit comments

Comments
 (0)