test some models on the 2k dataset (probably useless because to small)

This commit is contained in:
Tim
2025-08-13 19:36:59 +02:00
parent 4b35d4ca21
commit 5a7b42e403
12 changed files with 246 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.86 0.77 0.82 300
1 0.71 0.52 0.60 216
2 0.50 0.06 0.10 86
3 0.71 0.11 0.19 46
4 0.71 0.24 0.36 83
5 0.00 0.00 0.00 0
6 0.71 0.71 0.71 245
7 0.73 0.19 0.30 42
8 0.83 0.43 0.57 127
9 1.00 0.33 0.50 12
10 0.75 0.52 0.61 127
11 0.38 0.21 0.27 14
12 0.74 0.42 0.54 106
13 0.00 0.00 0.00 0
micro avg 0.76 0.52 0.62 1404
macro avg 0.62 0.32 0.40 1404
weighted avg 0.75 0.52 0.59 1404
samples avg 0.75 0.58 0.61 1404

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.87 0.76 0.81 300
1 0.70 0.59 0.64 216
2 0.58 0.13 0.21 86
3 0.56 0.11 0.18 46
4 0.71 0.30 0.42 83
5 0.00 0.00 0.00 0
6 0.69 0.70 0.69 245
7 0.62 0.31 0.41 42
8 0.76 0.41 0.53 127
9 1.00 0.50 0.67 12
10 0.67 0.50 0.57 127
11 0.40 0.29 0.33 14
12 0.74 0.45 0.56 106
13 0.00 0.00 0.00 0
micro avg 0.74 0.54 0.62 1404
macro avg 0.59 0.36 0.43 1404
weighted avg 0.73 0.54 0.60 1404
samples avg 0.74 0.59 0.61 1404

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.61 0.97 0.75 300
1 0.46 0.93 0.61 216
2 0.23 0.85 0.36 86
3 0.07 0.76 0.14 46
4 0.19 0.94 0.32 83
5 0.00 0.00 0.00 0
6 0.00 0.00 0.00 245
7 0.09 0.69 0.16 42
8 0.26 0.99 0.41 127
9 0.02 0.58 0.05 12
10 0.27 0.80 0.40 127
11 0.03 0.29 0.05 14
12 0.17 0.71 0.27 106
13 0.00 0.00 0.00 0
micro avg 0.24 0.73 0.36 1404
macro avg 0.17 0.61 0.25 1404
weighted avg 0.29 0.73 0.40 1404
samples avg 0.25 0.74 0.35 1404

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.85 0.75 0.80 300
1 0.72 0.52 0.60 216
2 0.70 0.19 0.29 86
3 0.43 0.07 0.11 46
4 0.59 0.16 0.25 83
5 0.00 0.00 0.00 0
6 0.66 0.62 0.64 245
7 0.60 0.29 0.39 42
8 0.73 0.49 0.58 127
9 0.75 0.25 0.38 12
10 0.75 0.49 0.59 127
11 0.67 0.14 0.24 14
12 0.68 0.50 0.58 106
13 0.00 0.00 0.00 0
micro avg 0.73 0.51 0.60 1404
macro avg 0.58 0.32 0.39 1404
weighted avg 0.71 0.51 0.58 1404
samples avg 0.73 0.56 0.59 1404

View File

@@ -0,0 +1,23 @@
precision recall f1-score support
0 0.75 0.90 0.82 300
1 0.72 0.68 0.70 216
2 0.50 0.08 0.14 86
3 0.27 0.07 0.11 46
4 0.40 0.07 0.12 83
5 0.00 0.00 0.00 0
6 0.77 0.82 0.79 245
7 0.33 0.10 0.15 42
8 0.67 0.40 0.50 127
9 0.00 0.00 0.00 12
10 0.71 0.37 0.49 127
11 0.00 0.00 0.00 14
12 0.49 0.31 0.38 106
13 0.00 0.00 0.00 0
micro avg 0.70 0.55 0.62 1404
macro avg 0.40 0.27 0.30 1404
weighted avg 0.64 0.55 0.56 1404
samples avg 0.73 0.59 0.61 1404
-> this is designed for binary/boolean features, so not for our dataset

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.79 0.94 0.86 300
1 0.77 0.60 0.68 216
2 0.55 0.07 0.12 86
3 0.00 0.00 0.00 46
4 0.56 0.06 0.11 83
5 0.00 0.00 0.00 0
6 0.78 0.83 0.80 245
7 0.29 0.05 0.08 42
8 0.90 0.20 0.33 127
9 0.00 0.00 0.00 12
10 0.84 0.29 0.43 127
11 0.25 0.14 0.18 14
12 0.78 0.13 0.23 106
13 0.00 0.00 0.00 0
micro avg 0.76 0.50 0.60 1404
macro avg 0.46 0.24 0.27 1404
weighted avg 0.72 0.50 0.53 1404
samples avg 0.78 0.56 0.61 1404

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.72 0.95 0.82 300
1 0.80 0.47 0.59 216
2 0.75 0.07 0.13 86
3 0.00 0.00 0.00 46
4 0.67 0.05 0.09 83
5 0.00 0.00 0.00 0
6 0.78 0.83 0.80 245
7 0.40 0.05 0.09 42
8 0.83 0.04 0.08 127
9 0.00 0.00 0.00 12
10 0.69 0.07 0.13 127
11 0.00 0.00 0.00 14
12 1.00 0.06 0.11 106
13 0.00 0.00 0.00 0
micro avg 0.73 0.44 0.55 1404
macro avg 0.47 0.18 0.20 1404
weighted avg 0.72 0.44 0.45 1404
samples avg 0.75 0.49 0.55 1404

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.67 0.98 0.80 300
1 0.81 0.36 0.50 216
2 0.67 0.05 0.09 86
3 0.00 0.00 0.00 46
4 0.80 0.05 0.09 83
5 0.00 0.00 0.00 0
6 0.77 0.81 0.79 245
7 0.40 0.05 0.09 42
8 0.83 0.04 0.08 127
9 0.00 0.00 0.00 12
10 0.43 0.02 0.04 127
11 0.00 0.00 0.00 14
12 1.00 0.05 0.09 106
13 0.00 0.00 0.00 0
micro avg 0.70 0.42 0.53 1404
macro avg 0.46 0.17 0.18 1404
weighted avg 0.69 0.42 0.42 1404
samples avg 0.71 0.46 0.52 1404

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.76 0.80 0.78 300
1 0.62 0.51 0.56 216
2 0.63 0.14 0.23 86
3 0.17 0.02 0.04 46
4 0.42 0.10 0.16 83
5 0.00 0.00 0.00 0
6 0.68 0.66 0.67 245
7 0.56 0.12 0.20 42
8 0.55 0.33 0.41 127
9 0.67 0.17 0.27 12
10 0.65 0.31 0.42 127
11 1.00 0.14 0.25 14
12 0.53 0.29 0.38 106
13 0.00 0.00 0.00 0
micro avg 0.66 0.47 0.55 1404
macro avg 0.52 0.26 0.31 1404
weighted avg 0.62 0.47 0.51 1404
samples avg 0.67 0.53 0.55 1404

View File

@@ -0,0 +1,13 @@
from sklearn.linear_model import LogisticRegression
from sklearn.naive_bayes import MultinomialNB
from sklearn.multioutput import MultiOutputClassifier
#LogisticRegression(max_iter=1337, random_state=0) -> bad macros
base_clf = MultinomialNB(alpha=0.25)
# n_jobs=1 since there seems to be some multithreading join issue in sklearn (or my pc is to bad)
multi_target_clf = MultiOutputClassifier(base_clf, n_jobs=1)
multi_target_clf.fit(X_train, y_train)
y_pred = multi_target_clf.predict(X_test)

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.68 0.97 0.80 300
1 0.82 0.39 0.53 216
2 0.60 0.03 0.07 86
3 0.00 0.00 0.00 46
4 0.80 0.05 0.09 83
5 0.00 0.00 0.00 0
6 0.78 0.81 0.80 245
7 0.40 0.05 0.09 42
8 1.00 0.04 0.08 127
9 0.00 0.00 0.00 12
10 0.43 0.02 0.04 127
11 0.00 0.00 0.00 14
12 1.00 0.05 0.09 106
13 0.00 0.00 0.00 0
micro avg 0.71 0.42 0.53 1404
macro avg 0.47 0.17 0.18 1404
weighted avg 0.71 0.42 0.42 1404
samples avg 0.72 0.47 0.53 1404

View File

@@ -0,0 +1,21 @@
precision recall f1-score support
0 0.64 0.99 0.78 300
1 0.85 0.24 0.37 216
2 0.60 0.03 0.07 86
3 0.00 0.00 0.00 46
4 0.80 0.05 0.09 83
5 0.00 0.00 0.00 0
6 0.78 0.80 0.79 245
7 0.40 0.05 0.09 42
8 1.00 0.04 0.08 127
9 0.00 0.00 0.00 12
10 0.20 0.01 0.02 127
11 0.00 0.00 0.00 14
12 1.00 0.05 0.09 106
13 0.00 0.00 0.00 0
micro avg 0.69 0.40 0.51 1404
macro avg 0.45 0.16 0.17 1404
weighted avg 0.68 0.40 0.39 1404
samples avg 0.70 0.44 0.50 1404