mirror of
https://github.com/microsoft/autogen.git
synced 2026-02-10 16:05:08 -05:00
micro/macro f1 metrics added. (#80)
* micro/macro f1 metrics added. * format lines.
This commit is contained in:
committed by
GitHub
parent
068fb9f5c2
commit
730fd14ef6
@@ -241,6 +241,23 @@ class TestAutoML(unittest.TestCase):
|
||||
|
||||
y_pred = automl_experiment.predict(fake_df)
|
||||
|
||||
def test_micro_macro_f1(self):
|
||||
automl_experiment = AutoML()
|
||||
automl_experiment_macro = AutoML()
|
||||
|
||||
automl_settings = {
|
||||
"time_budget": 2,
|
||||
"task": 'classification',
|
||||
"log_file_name": "test/micro_macro_f1.log",
|
||||
"log_training_metric": True,
|
||||
"n_jobs": 1,
|
||||
"model_history": True
|
||||
}
|
||||
|
||||
X_train, y_train = load_iris(return_X_y=True)
|
||||
automl_experiment.fit(X_train=X_train, y_train=y_train, metric='micro_f1', **automl_settings)
|
||||
automl_experiment_macro.fit(X_train=X_train, y_train=y_train, metric='macro_f1', **automl_settings)
|
||||
|
||||
def test_regression(self):
|
||||
|
||||
automl_experiment = AutoML()
|
||||
|
||||
Reference in New Issue
Block a user