Spaces:
Running
Running
mervenoyan
commited on
Commit
·
3bfabca
1
Parent(s):
ae1692d
misc improvements
Browse files
app.py
CHANGED
@@ -70,7 +70,10 @@ def train_baseline(dataset, dataset_name, token, column):
|
|
70 |
with tempfile.TemporaryDirectory() as tmpdirname:
|
71 |
from contextlib import redirect_stdout
|
72 |
|
73 |
-
|
|
|
|
|
|
|
74 |
username = HfApi().whoami(token=token)["name"]
|
75 |
repo_url = create_repo(repo_id = f"{username}/{dataset_name}", token = token)
|
76 |
|
|
|
70 |
with tempfile.TemporaryDirectory() as tmpdirname:
|
71 |
from contextlib import redirect_stdout
|
72 |
|
73 |
+
with open(f'{tmpdirname}/logs.txt', 'w') as f:
|
74 |
+
with redirect_stdout(f):
|
75 |
+
print('Logging training')
|
76 |
+
fc.fit(X, y)
|
77 |
username = HfApi().whoami(token=token)["name"]
|
78 |
repo_url = create_repo(repo_id = f"{username}/{dataset_name}", token = token)
|
79 |
|
logs.txt
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
Logging training
|
2 |
-
Running DummyClassifier()
|
3 |
-
accuracy: 0.643 average_precision: 0.357 roc_auc: 0.500 recall_macro: 0.500 f1_macro: 0.392
|
4 |
-
=== new best DummyClassifier() (using recall_macro):
|
5 |
-
accuracy: 0.643 average_precision: 0.357 roc_auc: 0.500 recall_macro: 0.500 f1_macro: 0.392
|
6 |
-
|
7 |
-
Running GaussianNB()
|
8 |
-
accuracy: 0.623 average_precision: 0.505 roc_auc: 0.590 recall_macro: 0.560 f1_macro: 0.549
|
9 |
-
=== new best GaussianNB() (using recall_macro):
|
10 |
-
accuracy: 0.623 average_precision: 0.505 roc_auc: 0.590 recall_macro: 0.560 f1_macro: 0.549
|
11 |
-
|
12 |
-
Running MultinomialNB()
|
13 |
-
accuracy: 0.647 average_precision: 0.481 roc_auc: 0.609 recall_macro: 0.589 f1_macro: 0.588
|
14 |
-
=== new best MultinomialNB() (using recall_macro):
|
15 |
-
accuracy: 0.647 average_precision: 0.481 roc_auc: 0.609 recall_macro: 0.589 f1_macro: 0.588
|
16 |
-
|
17 |
-
Running DecisionTreeClassifier(class_weight='balanced', max_depth=1)
|
18 |
-
accuracy: 0.586 average_precision: 0.401 roc_auc: 0.568 recall_macro: 0.568 f1_macro: 0.558
|
19 |
-
Running DecisionTreeClassifier(class_weight='balanced', max_depth=5)
|
20 |
-
accuracy: 0.590 average_precision: 0.419 roc_auc: 0.564 recall_macro: 0.576 f1_macro: 0.560
|
21 |
-
Running DecisionTreeClassifier(class_weight='balanced', min_impurity_decrease=0.01)
|
22 |
-
accuracy: 0.582 average_precision: 0.393 roc_auc: 0.563 recall_macro: 0.567 f1_macro: 0.555
|
23 |
-
Running LogisticRegression(C=0.1, class_weight='balanced', max_iter=1000)
|
24 |
-
accuracy: 0.574 average_precision: 0.487 roc_auc: 0.425 recall_macro: 0.548 f1_macro: 0.547
|
25 |
-
Running LogisticRegression(class_weight='balanced', max_iter=1000)
|
26 |
-
accuracy: 0.578 average_precision: 0.470 roc_auc: 0.437 recall_macro: 0.562 f1_macro: 0.557
|
27 |
-
|
28 |
-
Best model:
|
29 |
-
Pipeline(steps=[('minmaxscaler', MinMaxScaler()), ('multinomialnb', MultinomialNB())])
|
30 |
-
Best Scores:
|
31 |
-
accuracy: 0.647 average_precision: 0.481 roc_auc: 0.609 recall_macro: 0.589 f1_macro: 0.588
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|