diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-03-08 10:54:20 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-03-08 10:54:20 +0100 |
commit | e31a672ba4dc8a9b605cb02882f8afbfa4bbbe7b (patch) | |
tree | 27c14cfe2fcd212aa3286044103b638c669f8393 /lib | |
parent | f14522292b4952456dbcf7aeaa2d33b78dc3c953 (diff) |
symreg hyper param
Diffstat (limited to 'lib')
-rw-r--r-- | lib/functions.py | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/functions.py b/lib/functions.py index be4f56b..212e47a 100644 --- a/lib/functions.py +++ b/lib/functions.py @@ -1537,17 +1537,21 @@ class SymbolicRegressionFunction(SKLearnRegressionFunction): return rstr.count(",") * 2 + 1 def hyper_to_dref(self): - return { - "symreg/population size": self.regressor.population_size, - "symreg/generations": self.regressor.generations, - "symreg/tournament size": self.regressor.tournament_size, - "symreg/const range/min": self.regressor.const_range[0], - "symreg/const range/max": self.regressor.const_range[1], - "symreg/function set": " ".join(self.regressor.function_set), - "symreg/metric": self.regressor.metric, - "symreg/parsimony coefficient": self.regressor.parsimony_coefficient, - "symreg/n jobs": self.regressor.n_jobs, - } + hyper = super().hyper_to_dref() + hyper.update( + { + "symreg/population size": self.regressor.population_size, + "symreg/generations": self.regressor.generations, + "symreg/tournament size": self.regressor.tournament_size, + "symreg/const range/min": self.regressor.const_range[0], + "symreg/const range/max": self.regressor.const_range[1], + "symreg/function set": " ".join(self.regressor.function_set), + "symreg/metric": self.regressor.metric, + "symreg/parsimony coefficient": self.regressor.parsimony_coefficient, + "symreg/n jobs": self.regressor.n_jobs, + } + ) + return hyper # first-order linear function (no feature interaction) |