mlr-org / mlr3pipelines

Dataflow Programming for Machine Learning in R
https://mlr3pipelines.mlr-org.com/
GNU Lesser General Public License v3.0
137 stars 25 forks source link

base_learner #710

Closed mb706 closed 1 year ago

mb706 commented 1 year ago

closes #699 closes #603

@be-marc can you check whether this works with the tooling that relies on it?

@mllg I am a it confused by how this is supposed to be implemented. The implementation in Learner seems to suggest that private$.base_learner should be implemented, but $base_learner() doesn't do anything except delegate there, not even if (recursive <= 0) return(self) or assert(check_int(recursive), check_numeric(recursive, lower = Inf)). Consequently, AutoTuner just overwrites the method and does not use private$.base_learner. I also find it weird that recursive = 0 does not return self there.

be-marc commented 1 year ago

Looks good. The use cases that have come up for me work. Yes this should be self instead of self$learner. Thanks!

mb706 commented 1 year ago

ok, updated this PR to also have recursive <= 0 return self.