From 340635506790a93d8123b195c08581b0b9f7bcd0 Mon Sep 17 00:00:00 2001 From: anna-charlotte Date: Mon, 27 Jan 2025 09:40:21 +0100 Subject: [PATCH 1/2] add missing max iterations parameter --- alphadia/workflow/peptidecentric.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/alphadia/workflow/peptidecentric.py b/alphadia/workflow/peptidecentric.py index 9c9eafd1..7e6e39ce 100644 --- a/alphadia/workflow/peptidecentric.py +++ b/alphadia/workflow/peptidecentric.py @@ -99,6 +99,7 @@ def get_classifier_base( enable_two_step_classifier: bool = False, + two_step_classifier_max_iterations: int = 5, enable_nn_hyperparameter_tuning: bool = False, fdr_cutoff: float = 0.01, ): @@ -136,6 +137,7 @@ def get_classifier_base( first_classifier=LogisticRegressionClassifier(), second_classifier=nn_classifier, second_fdr_cutoff=fdr_cutoff, + max_iterations=two_step_classifier_max_iterations, ) else: return nn_classifier @@ -179,6 +181,9 @@ def init_fdr_manager(self): enable_two_step_classifier=self.config["fdr"][ "enable_two_step_classifier" ], + two_step_classifier_max_iterations=self.config["fdr"][ + "two_step_classifier_max_iterations" + ], enable_nn_hyperparameter_tuning=self.config["fdr"][ "enable_nn_hyperparameter_tuning" ], From 1999c019b723e1a0d930e9f5ffcd88abc9901cf0 Mon Sep 17 00:00:00 2001 From: anna-charlotte Date: Mon, 27 Jan 2025 09:46:51 +0100 Subject: [PATCH 2/2] fix docstring --- alphadia/workflow/peptidecentric.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/alphadia/workflow/peptidecentric.py b/alphadia/workflow/peptidecentric.py index 7e6e39ce..71747ec3 100644 --- a/alphadia/workflow/peptidecentric.py +++ b/alphadia/workflow/peptidecentric.py @@ -111,6 +111,9 @@ def get_classifier_base( If True, uses logistic regression + neural network. If False (default), uses only neural network. + two_step_classifier_max_iterations : int + Maximum number of iterations withtin .fit_predict() of the two-step classifier. + enable_nn_hyperparameter_tuning: bool, optional If True, uses hyperparameter tuning for the neural network. If False (default), uses default hyperparameters for the neural network.