Skip to content

Commit

Permalink
setup log ndcg study
Browse files Browse the repository at this point in the history
  • Loading branch information
timovdk committed Feb 5, 2025
1 parent c857d77 commit 0d5803e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions asreview2-optuna/classifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ def naive_bayes_params(trial: optuna.trial.FrozenTrial):

def logistic_params(trial: optuna.trial.FrozenTrial):
# Use logarithmic normal distribution for C (C effect is non-linear)
C = trial.suggest_float("log__C", 0.01, 10, log=True)
C = trial.suggest_float("log__C", 0.01, 100, log=True)

solver = "lbfgs"
solver = trial.suggest_categorical("log__solver", ["lbfgs", "liblinear", "saga"])

return {"C": C, "solver": solver}
max_iter = 100
if solver == "saga":
max_iter = trial.suggest_int("log__max_iter", 100, 2000)
return {"C": C, "solver": "lbfgs", "max_iter": max_iter}


def svm_params(trial: optuna.trial.FrozenTrial):
Expand Down
2 changes: 1 addition & 1 deletion asreview2-optuna/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
CLASSIFIER_TYPE = "log" # Options: "nb", "log", "svm", "rf"
FEATURE_EXTRACTOR_TYPE = "tfidf" # Options: "tfidf", "onehot", "labse", "bge-m3", "stella", "mxbai"
PICKLE_FOLDER_PATH = Path("synergy-dataset", f"pickles_{FEATURE_EXTRACTOR_TYPE}")
PRE_PROCESSED_FMS = True # False = on the fly
PRE_PROCESSED_FMS = False # False = on the fly
PARALLELIZE_OBJECTIVE = True
AUTO_SHUTDOWN = True

Expand Down

0 comments on commit 0d5803e

Please sign in to comment.