From 72b8b1a2747b4e5c22322e6b982d9c463fcbe1d4 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 19 Apr 2021 13:41:53 +0300 Subject: [PATCH] MLLM fix: don't include use_hidden_labels in hyperopt, it won't have any effect --- annif/backend/mllm.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/annif/backend/mllm.py b/annif/backend/mllm.py index c7df41b9c..0d72669bf 100644 --- a/annif/backend/mllm.py +++ b/annif/backend/mllm.py @@ -32,8 +32,6 @@ def _objective(self, trial): 'min_samples_leaf': trial.suggest_int('min_samples_leaf', 5, 30), 'max_leaf_nodes': trial.suggest_int('max_leaf_nodes', 100, 2000), 'max_samples': trial.suggest_float('max_samples', 0.5, 1.0), - 'use_hidden_labels': - trial.suggest_categorical('use_hidden_labels', [True, False]), 'limit': 100 } model = self._backend._model._create_classifier(params) @@ -59,8 +57,7 @@ def _postprocess(self, study): lines = [ f"min_samples_leaf={bp['min_samples_leaf']}", f"max_leaf_nodes={bp['max_leaf_nodes']}", - f"max_samples={bp['max_samples']:.4f}", - f"use_hidden_labels={bp['use_hidden_labels']}" + f"max_samples={bp['max_samples']:.4f}" ] return hyperopt.HPRecommendation(lines=lines, score=study.best_value)