mirror of
https://github.com/MAGICGrants/Monero-Dataset-Pipeline.git
synced 2026-01-08 21:17:57 -05:00
- changed samples to weighted
This commit is contained in:
@@ -54,7 +54,7 @@ def run_model(X_train, X_test, y_train, y_test, RANDOM_STATE, X_Validation, y_Va
|
||||
# Metrics
|
||||
print("GBC Metrics ")
|
||||
y_pred = model.predict(X_test)
|
||||
micro_f1 = f1_score(y_test, y_pred, average='samples')
|
||||
micro_f1 = f1_score(y_test, y_pred, average='weighted')
|
||||
print('avg F1-score: {:.2f}'.format(micro_f1))
|
||||
#out_of_sample_f1.append(micro_f1)
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ def MLP(X_train, X_test, y_train, y_test, X_Validation, y_Validation, stagenet=T
|
||||
print("NN Metrics ")
|
||||
y_pred = model.predict(X_test)
|
||||
y_pred = np.argmax(y_pred, axis=1).tolist()
|
||||
micro_f1 = f1_score(y_test_copy, y_pred, average='samples')
|
||||
micro_f1 = f1_score(y_test_copy, y_pred, average='weighted')
|
||||
print('Avg F1-score: {:.2f}'.format(micro_f1))
|
||||
out_of_sample_f1.append(micro_f1)
|
||||
if stagenet:
|
||||
|
||||
@@ -50,7 +50,7 @@ def run_model_rf(X_train, X_test, y_train, y_test, RANDOM_STATE, X_Validation, y
|
||||
# Metrics
|
||||
print("Random Forest Metrics ")
|
||||
y_pred = model.predict(X_test)
|
||||
micro_f1 = f1_score(y_test, y_pred, average='samples')
|
||||
micro_f1 = f1_score(y_test, y_pred, average='weighted')
|
||||
print('avg F1-score: {:.2f}'.format(micro_f1))
|
||||
#out_of_sample_f1.append(micro_f1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user