Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPOs don't work with runTaskMlr in Openml #49

Open
ja-thomas opened this issue Jun 25, 2018 · 1 comment
Open

CPOs don't work with runTaskMlr in Openml #49

ja-thomas opened this issue Jun 25, 2018 · 1 comment

Comments

@ja-thomas
Copy link
Contributor

(Not sure if this has be solved in openml)

We cannot run (and upload) lrn with attached CPOs on OpenML Tasks

lrn = cpoFilterChiSquared(abs = 3) %>>%
   makeLearner("classif.rpart")
task = getOMLTask(3)
runTaskMlr(task, lrn)
Error in removeHyperPars.CPOLearner(lrn, ids = all.pars) : 
  CPO Parameters (chi.squared.perc, chi.squared.abs, chi.squared.threshold) can not be removed

@giuseppec Any hints?

@mb706
Copy link
Collaborator

mb706 commented Jun 26, 2018

CPO currently does not allow hyperparameters to be removed. A CPO with missing parameters could either be considered "incomplete" and would then throw an error when called (as when calling a function without giving all necessary arguments), or it could just use some kind of default values for the parameters instead. I made the decision to go with the first option, because I didn't want to have implicit behaviour in CPO parameters (suddenly you have to keep track of the parameters and of what their default values are). The "default" value of a parameter is therefore just the value it is initialized with:

> getHyperPars(cpoPca())
$pca.center
[1] TRUE

$pca.scale
[1] FALSE

CPOs with missing parameters give an error when invoked:

> iris.task %>>% cpoWrap()
Error in checkAllParams(cpo$par.vals, cpo$par.set, cpo$debug.name) :
  Parameter wrap.cpo of CPO wrap is missing
Either give it during construction, or with setHyperPars.

Removing hyperparameters from CPOLearners would just be a "make this not work anymore" switch, not a "reset to original state" switch as I think it is intended in that invocation at OpenML(?).

Why does OpenML do that? (Does it even work with ModelMultiplexer etc?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants