Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -80,21 +80,13 @@ y_pred = model.predict(x_test)
|
|
80 |
|
81 |
def get_feats():
|
82 |
feats = [abs(x) for x in model.coef_[0]]
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
for idx, col in enumerate(reversed(cols)):
|
88 |
-
output.append(col)
|
89 |
-
|
90 |
-
# max_val = max(feats)
|
91 |
-
# idx = feats.index(max_val)
|
92 |
-
# return data.columns[idx]
|
93 |
-
return output
|
94 |
|
95 |
acc = str(round(metrics.accuracy_score(y_test, y_pred) * 100, 2)) + '%'
|
96 |
-
|
97 |
-
info = get_article(acc,
|
98 |
|
99 |
|
100 |
|
|
|
80 |
|
81 |
def get_feats():
|
82 |
feats = [abs(x) for x in model.coef_[0]]
|
83 |
+
max_val = max(feats)
|
84 |
+
idx = feats.index(max_val)
|
85 |
+
return data.columns[idx]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
acc = str(round(metrics.accuracy_score(y_test, y_pred) * 100, 2)) + '%'
|
88 |
+
feat = get_feat()
|
89 |
+
info = get_article(acc, feat)
|
90 |
|
91 |
|
92 |
|