cavalab / srbench

A living benchmark framework for symbolic regression
https://cavalab.org/srbench/
GNU General Public License v3.0
203 stars 75 forks source link

update model complexity #32

Closed foolnotion closed 3 years ago

foolnotion commented 3 years ago

update returned complexity as discussed in #3

after fitting the regressor generates a statistics dictionary:

        self._stats = {
            'model_length':        self._model.Length - 4, # do not count scaling nodes?
            'model_complexity':    self._model.Length - 4 + 2 * n_vars,
            'generations':         gp.Generation,
            'fitness_evaluations': evaluator.FitnessEvaluations,
            'local_evaluations':   evaluator.LocalEvaluations,
            'random_state':        self.random_state
        }

model_length counts the actual tree nodes (just as before), while model_complexity also counts the multiplication with a weight for each variable node.