mlr3 icon indicating copy to clipboard operation
mlr3 copied to clipboard

BREAKING CHANGE: Introduce default_params

Open sebffischer opened this issue 2 years ago • 5 comments

  • Improves transparency: Learners should set those values in the initialize function (and not e.g. in $.train)
  • Could be used in description for automatic display of defaults
  • Could be used to properly reset a learner to it's initial state.

sebffischer avatar May 12 '22 07:05 sebffischer

@mllg What do you think?

sebffischer avatar Jun 15 '22 14:06 sebffischer

I like the idea. Would this break mlr3learners and other packages? If yes, can we prepare an intermediate release so that we can migrate gracefully, i.e. without synchronizing CRAN package uploads?

mllg avatar Jun 15 '22 19:06 mllg

I just realized that we don't even have to break anything, we could simply set private$.default_params = self$param_set$values

sebffischer avatar Jun 24 '22 13:06 sebffischer

So I think now it should not break anything, and we don't have to change the learners either

sebffischer avatar Jun 24 '22 14:06 sebffischer

should we also automatically reset the parameters to the default parameters when calling $reset()?

sebffischer avatar Jun 24 '22 15:06 sebffischer