From dd771700deec0da58b1bae5d702def990d7b3509 Mon Sep 17 00:00:00 2001 From: timovdk <5330531+timovdk@users.noreply.github.com> Date: Fri, 24 Jan 2025 12:37:15 +0100 Subject: [PATCH] setup demo 2 --- asreview2-optuna/classifiers.py | 4 ++-- asreview2-optuna/main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/asreview2-optuna/classifiers.py b/asreview2-optuna/classifiers.py index 03b395c..58c1135 100644 --- a/asreview2-optuna/classifiers.py +++ b/asreview2-optuna/classifiers.py @@ -37,10 +37,10 @@ def svm_params(trial: optuna.trial.FrozenTrial): def random_forest_params(trial: optuna.trial.FrozenTrial): # Use normal distribution for n_estimators (n_estimators effect is linear) - n_estimators = trial.suggest_int("rf__n_estimators", 50, 500) + n_estimators = trial.suggest_int("rf__n_estimators", 50, 200) # Use normal distribution for max_features (max_features effect is linear) - max_features = trial.suggest_int("rf__max_features", 2, 20) + max_features = trial.suggest_categorical("rf__max_features", ["sqrt", "log2"]) return {"n_estimators": n_estimators, "max_features": max_features} diff --git a/asreview2-optuna/main.py b/asreview2-optuna/main.py index 1a8410b..8084a05 100644 --- a/asreview2-optuna/main.py +++ b/asreview2-optuna/main.py @@ -19,7 +19,7 @@ from feature_extractors import feature_extractor_params, feature_extractors # Study variables -VERSION = 1 +VERSION = 2 STUDY_SET = "demo" PICKLE_FOLDER_PATH = Path("synergy-dataset", "pickles") CLASSIFIER_TYPE = "rf" # Options: "nb", "log", "svm", "rf"