Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
wrapper fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-r committed Sep 7, 2017
1 parent 52a047b commit a689f66
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 4 deletions.
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Generated by roxygen2: do not edit by hand

S3method(makeWrappedModel,TuneWrapper)
S3method(predictLearner,HyperoptWrapper)
S3method(print,ParConfig)
S3method(trainLearner,HyperoptWrapper)
export(downloadParConfig)
export(downloadParConfigs)
export(generateHyperControl)
Expand All @@ -21,6 +24,7 @@ export(getParConfigParVals)
export(getTaskDictionary)
export(hyperopt)
export(makeHyperControl)
export(makeHyperoptWrapper)
export(makeParConfig)
export(setHyperControlMeasures)
export(setHyperControlMlrControl)
Expand Down
1 change: 0 additions & 1 deletion R/HyperoptWrapper.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#' @template arg_parconfig
#' @template arg_hypercontrol
#' @template arg_showinfo
#' @template
#' @return [\code{\link{Learner}}].
#' @export
#' @family tune
Expand Down
45 changes: 45 additions & 0 deletions man/makeHyperoptWrapper.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/testthat/test_HyperoptWrapper.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ context("HyperoptWrapper")
test_that("hyperoptWrapper works", {
mlr::configureMlr(show.info = FALSE, show.learner.output = FALSE)
lrn = makeLearner("classif.svm")
lrn = makeHyperoptWrapper(lrn)
lrn2 = makeHyperoptWrapper(lrn)
task = iris.task
res = resample(learner = lrn, task = task, resampling = cv2, extract = getTuneResult)
res = resample(learner = lrn2, task = task, resampling = cv2, extract = getTuneResult)
expect_class(res$extract[[1]], "TuneResult")
expect_data_frame(getNestedTuneResultsX(res))
expect_data_frame(getNestedTuneResultsOptPathDf(res))
Expand All @@ -23,7 +23,7 @@ test_that("hyperoptWrapper works", {
par.config = setParConfigParSet(par.config, par.set)
par.config = setParConfigParVals(par.config, par.vals = list())
lrn2 = makeHyperoptWrapper(learner = lrn, par.config = par.config, hyper.control = hyper.control)
res = resample(learner = lrn2, task = task, resampling = cv2, extract = getTuneResult)
res = resample(learner = lrn2, task = sonar.task, resampling = cv2, extract = getTuneResult)
expect_class(res$extract[[1]], "TuneResult")
expect_data_frame(getNestedTuneResultsX(res))
expect_data_frame(getNestedTuneResultsOptPathDf(res))
Expand Down

0 comments on commit a689f66

Please sign in to comment.