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

getHyperPars.BaseWrapper broken for imputeWrapper? #2218

Closed
giuseppec opened this issue Mar 12, 2018 · 2 comments
Closed

getHyperPars.BaseWrapper broken for imputeWrapper? #2218

giuseppec opened this issue Mar 12, 2018 · 2 comments
Labels

Comments

@giuseppec
Copy link
Contributor

This here works and gives is the hyperparameters

rf = makeLearner("classif.randomForest")
lrn2 = makeFilterWrapper(rf, fw.perc = 0.5, fw.method = "variance")
lrn2$par.vals
# $fw.method
# [1] "variance"
# 
# $fw.perc
# [1] 0.5
getHyperPars(lrn2)
# $fw.method
# [1] "variance"
# 
# $fw.perc
# [1] 0.5

This here is buggy and we get an empty list, no matter which hyperparameter of the imputeWrapper are set:

rf = makeLearner("classif.randomForest")
lrn = makeImputeWrapper(rf, class = imputeMedian(), impute.new.levels = FALSE)
lrn$par.vals # this contains some defaults + the changed hyperparameters
getHyperPars(lrn) # this is an empty list
@giuseppec
Copy link
Contributor Author

This also happens for makeDummyFeaturesWrapper and makeRemoveConstantFeaturesWrapper. I think this happens because all those wrappers internally use the makePreprocWrapper function without changing the par.set default which is makePreprocWrapper(..., par.set = makeParamSet()). Not sure if feature or bug? Is there a reason why we don't extend the param.set for all those wrappers?

@stale
Copy link

stale bot commented Dec 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 18, 2019
@stale stale bot closed this as completed Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant