summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-02-21 15:24:33 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-02-21 15:24:33 +0100
commitbb773703ffa9951e31acb21c09e9b1fd151836fa (patch)
treeacfead75fb315a0f49efed020903fe545234a20e
parent0ce9577754bc3e39a47be6fec50f6cc1d255dd5e (diff)
SymReg: use MSE and set feature_names
-rw-r--r--lib/functions.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/functions.py b/lib/functions.py
index 07d3e2f..fdd2cfb 100644
--- a/lib/functions.py
+++ b/lib/functions.py
@@ -1193,9 +1193,11 @@ class SymbolicRegressionFunction(SKLearnRegressionFunction):
from dfatool.gplearn.genetic import SymbolicRegressor
- self.regressor = SymbolicRegressor()
- self.regressor.fit(fit_parameters, data)
self._build_feature_names()
+ self.regressor = SymbolicRegressor(
+ metric="mse", feature_names=self.feature_names
+ )
+ self.regressor.fit(fit_parameters, data)
self.fit_success = True
return self