Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
schalkdaniel committed Mar 15, 2023
1 parent d01329f commit 96a02c2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 37 deletions.
21 changes: 6 additions & 15 deletions R/mlr_learner.R
Expand Up @@ -40,13 +40,10 @@ ichecker = function(x) {
}
}

#' @title Component-wise boosting learner
#'
#' @name mlr_learners.compboost
#' @title Component-wise gradient boosting learner
#'
#' @description
#' A [Learner] for a component-wise boosting model implemented in [compboost::Compboost]
#' in package \CRANpkg{compboost}.
#' A [Learner] for a component-wise boosting model implemented in [compboost::Compboost].
#'
#' @importFrom mlr3 mlr_learners Learner
LearnerCompboost = R6::R6Class("LearnerCompboost", inherit = Learner,
Expand Down Expand Up @@ -237,13 +234,10 @@ LearnerCompboost = R6::R6Class("LearnerCompboost", inherit = Learner,
)
)

#' @title Classification component-wise boosting learner
#'
#' @name mlr_learners_classif.compboost
#' @title Component-wise gradient boosting classification learner
#'
#' @description
#' A [Learner] for a component-wise boosting model implemented in [compboost::Compboost]
#' in package \CRANpkg{compboost}.
#' A [Learner] for a component-wise boosting model implemented in [compboost::Compboost].
#'
#' @examples
#' l = lrn("classif.compboost", baselearner = "components",
Expand All @@ -262,13 +256,10 @@ LearnerClassifCompboost = R6::R6Class("LearnerClassifCompboost", inherit = Learn
)
)

#' @title Regression component-wise boosting learner
#'
#' @name mlr_learners_regr.compboost
#' @title Component-wise gradient boosting regression learner
#'
#' @description
#' A [Learner] for a component-wise boosting model implemented in [compboost::Compboost]
#' in package \CRANpkg{compboost}.
#' A [Learner] for a component-wise boosting model implemented in [compboost::Compboost].
#'
#' @examples
#' l = lrn("regr.compboost", baselearner = "linear", iterations = 50)
Expand Down
8 changes: 4 additions & 4 deletions R/plot_tensor.R
Expand Up @@ -21,10 +21,10 @@
#' cboost = Compboost$new(data = iris, target = "Petal.Length",
#' loss = LossQuadratic$new(), learning_rate = 0.2)
#'
#' cboost$addTensor("Sepal.Width", "Sepal.Length", df1 = 4, df2 = 4)
#' cboost$addTensor("Sepal.Width", "Species", df1 = 4, df2 = 2)
#' cboost$addTensor("Sepal.Width", "Sepal.Length", df1 = 4, df2 = 4, n_knots = 10)
#' cboost$addTensor("Sepal.Width", "Species", df1 = 4, df2 = 2, n_knots = 10)
#'
#' cboost$train(50L)
#' cboost$train(40L)
#'
#' plotTensor(cboost, "Sepal.Width_Species_tensor")
#' plotTensor(cboost, "Sepal.Width_Sepal.Length_tensor")
Expand All @@ -44,7 +44,7 @@ plotTensor = function(cboost, tname, npoints = 100L, nbins = 15L) {
if (! checkmate::testChoice(x = tname, choices = blsel)) {
stop("Tensor base learner '", tname, "' was not selected. The selected base learner are {",
paste(paste0("'", blsel, "'"), collapse = ","), "}. Maybe you misspelled the base learner",
"or did not train long enough.")
" or did not train long enough.")
}

checkmate::assertIntegerish(x = npoints, len = 1L, lower = 10L)
Expand Down

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

8 changes: 3 additions & 5 deletions man/mlr_learners.compboost.Rd → man/LearnerCompboost.Rd

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

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

6 changes: 3 additions & 3 deletions man/plotTensor.Rd

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

0 comments on commit 96a02c2

Please sign in to comment.