Skip to content

Commit ac0b423

Browse files
committed
changed name to PipeOpLearnerPICVPlus
1 parent a8c58e1 commit ac0b423

File tree

85 files changed

+144
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+144
-144
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Collate:
161161
'PipeOpKernelPCA.R'
162162
'PipeOpLearner.R'
163163
'PipeOpLearnerCV.R'
164-
'PipeOpLearnerCVPlus.R'
164+
'PipeOpLearnerPICVPlus.R'
165165
'PipeOpMissingIndicators.R'
166166
'PipeOpModelMatrix.R'
167167
'PipeOpMultiplicity.R'

NAMESPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ S3method(format,CnfUniverse)
5252
S3method(marshal_model,Multiplicity)
5353
S3method(marshal_model,graph_learner_model)
5454
S3method(marshal_model,pipeop_impute_learner_state)
55-
S3method(marshal_model,pipeop_learner_cv_plus_state)
5655
S3method(marshal_model,pipeop_learner_cv_state)
56+
S3method(marshal_model,pipeop_learner_pi_cvplus_state)
5757
S3method(po,"NULL")
5858
S3method(po,Filter)
5959
S3method(po,Learner)
@@ -76,8 +76,8 @@ S3method(set_validate,PipeOpLearner)
7676
S3method(unmarshal_model,Multiplicity_marshaled)
7777
S3method(unmarshal_model,graph_learner_model_marshaled)
7878
S3method(unmarshal_model,pipeop_impute_learner_state_marshaled)
79-
S3method(unmarshal_model,pipeop_learner_cv_plus_state_marshaled)
8079
S3method(unmarshal_model,pipeop_learner_cv_state_marshaled)
80+
S3method(unmarshal_model,pipeop_learner_pi_cvplus_state_marshaled)
8181
export("%>>!%")
8282
export("%>>%")
8383
export("%among%")
@@ -127,7 +127,7 @@ export(PipeOpImputeSample)
127127
export(PipeOpKernelPCA)
128128
export(PipeOpLearner)
129129
export(PipeOpLearnerCV)
130-
export(PipeOpLearnerCVPlus)
130+
export(PipeOpLearnerPICVPlus)
131131
export(PipeOpMissInd)
132132
export(PipeOpModelMatrix)
133133
export(PipeOpMultiplicityExply)

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# mlr3pipelines 0.7.0-9000
22

33
* New down-sampling PipeOps for inbalanced data: `PipeOpTomek` / `po("tomek")` and `PipeOpNearmiss` / `po("nearmiss")`
4-
* New PipeOp `PipeOpLearnerCVPlus / po("learner_cv_plus")`
4+
* New PipeOp `PipeOpLearnerPICVPlus / po("learner_pi_cvplus")`
55

66
# mlr3pipelines 0.7.0
77

R/PipeOpLearnerCVPlus.R renamed to R/PipeOpLearnerPICVPlus.R

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
#' @title Wrap a Learner into a PipeOp with Cross-validation Plus Confidence Intervals as Predictions
22
#'
33
#' @usage NULL
4-
#' @name mlr_pipeops_learner_cv_plus
4+
#' @name mlr_pipeops_learner_pi_cvplus
55
#' @format [`R6Class`][R6::R6Class] object inheriting from [`PipeOp`].
66
#'
77
#' @description
88
#' Wraps an [`mlr3::Learner`] into a [`PipeOp`].
99
#'
1010
#' Inherits the `$param_set` (and therefore `$param_set$values`) from the [`Learner`][mlr3::Learner] it is constructed from.
1111
#'
12-
#' Using [`PipeOpLearnerCVPlus`], it is possible to embed a [`mlr3::Learner`] into a [`Graph`].
13-
#' [`PipeOpLearnerCVPlus`] can then be used to perform cross validation plus (or jackknife plus).
14-
#' During training, [`PipeOpLearnerCVPlus`] performs cross validation on the training data.
12+
#' Using [`PipeOpLearnerPICVPlus`], it is possible to embed a [`mlr3::Learner`] into a [`Graph`].
13+
#' [`PipeOpLearnerPICVPlus`] can then be used to perform cross validation plus (or jackknife plus).
14+
#' During training, [`PipeOpLearnerPICVPlus`] performs cross validation on the training data.
1515
#' During prediction, the models from the training stage are used to construct predictive confidence intervals for the prediction data based on
1616
#' out-of-fold residuals and out-of-fold predictions.
1717
#'
1818
#' @section Construction:
1919
#' ```
20-
#' PipeOpLearnerCVPlus$new(learner, id = NULL, param_vals = list())
20+
#' PipeOpLearnerPICVPlus$new(learner, id = NULL, param_vals = list())
2121
#' ```
2222
#'
2323
#' * `learner` :: [`LearnerRegr`][mlr3::LearnerRegr]
2424
#' [`LearnerRegr`][mlr3::LearnerRegr] to use for the cross validation models in the Cross Validation Plus method.
25-
#' This argument is always cloned; to access the [`Learner`][mlr3::Learner] inside `PipeOpLearnerCVPlus` by-reference, use `$learner`.\cr
25+
#' This argument is always cloned; to access the [`Learner`][mlr3::Learner] inside `PipeOpLearnerPICVPlus` by-reference, use `$learner`.\cr
2626
#' * `id` :: `character(1)`
2727
#' Identifier of the resulting object, internally defaulting to the `id` of the [`Learner`][mlr3::Learner] being wrapped.
2828
#' * `param_vals` :: named `list`\cr
2929
#' List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction.
3030
#' Default is `list()`.
3131
#'
3232
#' @section Input and Output Channels:
33-
#' [`PipeOpLearnerCVPlus`] has one input channel named `"input"`, taking a [`Task`][mlr3::Task] specific to the [`Learner`][mlr3::Learner]
33+
#' [`PipeOpLearnerPICVPlus`] has one input channel named `"input"`, taking a [`Task`][mlr3::Task] specific to the [`Learner`][mlr3::Learner]
3434
#' type given to `learner` during construction; both during training and prediction.
3535
#'
36-
#' [`PipeOpLearnerCVPlus`] has one output channel named `"output"`, producing `NULL` during training and a [`PredictionRegr`][mlr3::PredictionRegr]
36+
#' [`PipeOpLearnerPICVPlus`] has one output channel named `"output"`, producing `NULL` during training and a [`PredictionRegr`][mlr3::PredictionRegr]
3737
#' during prediction.
3838
#'
3939
#' The output during prediction is a [`PredictionRegr`][mlr3::PredictionRegr] with `predict_type` `quantiles` on the prediction input data.
@@ -65,11 +65,11 @@
6565
#' [`Learner`][mlr3::Learner] that is being wrapped.
6666
#' Read-only.
6767
#' * `learner_model` :: [`Learner`][mlr3::Learner] or `list`\cr
68-
#' If the [`PipeOpLearnerCVPlus`] has been trained, this is a `list` containing the [`Learner`][mlr3::Learner]s of the cross validation models.
68+
#' If the [`PipeOpLearnerPICVPlus`] has been trained, this is a `list` containing the [`Learner`][mlr3::Learner]s of the cross validation models.
6969
#' Otherwise, this contains the [`Learner`][mlr3::Learner] that is being wrapped.
7070
#' Read-only.
7171
#' * `predict_type`\cr
72-
#' Predict type of the [`PipeOpLearnerCVPlus`], which is always `"response" "quantiles"`.
72+
#' Predict type of the [`PipeOpLearnerPICVPlus`], which is always `"response" "quantiles"`.
7373
#' This can be different to the predict type of the [`Learner`][mlr3::Learner] that is being wrapped.
7474
#'
7575
#' @section Methods:
@@ -89,12 +89,12 @@
8989
#'
9090
#' task = tsk("mtcars")
9191
#' learner = lrn("regr.rpart")
92-
#' lrncvplus_po = mlr_pipeops$get("learner_cv_plus", learner)
92+
#' lrncvplus_po = mlr_pipeops$get("learner_pi_cvplus", learner)
9393
#'
9494
#' lrncvplus_po$train(list(task))
9595
#' lrncvplus_po$predict(list(task))
9696
#' \dontshow{ \} }
97-
PipeOpLearnerCVPlus = R6Class("PipeOpLearnerCVPlus",
97+
PipeOpLearnerPICVPlus = R6Class("PipeOpLearnerPICVPlus",
9898
inherit = PipeOp,
9999
public = list(
100100
initialize = function(learner, id = NULL, param_vals = list()) {
@@ -103,7 +103,7 @@ PipeOpLearnerCVPlus = R6Class("PipeOpLearnerCVPlus",
103103
type = private$.learner$task_type
104104

105105
if ("regr" != type) {
106-
stop("PipeOpLearnerCVPlus only supports regression.")
106+
stop("PipeOpLearnerPICVPlus only supports regression.")
107107
}
108108

109109
task_type = mlr_reflections$task_types[type, mult = "first"]$task
@@ -158,7 +158,7 @@ PipeOpLearnerCVPlus = R6Class("PipeOpLearnerCVPlus",
158158
}
159159
),
160160
private = list(
161-
.state_class = "pipeop_learner_cv_plus_state",
161+
.state_class = "pipeop_learner_pi_cvplus_state",
162162

163163
.train = function(inputs) {
164164
task = inputs[[1L]]
@@ -216,7 +216,7 @@ PipeOpLearnerCVPlus = R6Class("PipeOpLearnerCVPlus",
216216
)
217217

218218
#' @export
219-
marshal_model.pipeop_learner_cv_plus_state = function(model, inplace = FALSE, ...) {
219+
marshal_model.pipeop_learner_pi_cvplus_state = function(model, inplace = FALSE, ...) {
220220
# Note that a Learner state contains other reference objects, but we don't clone them here, even when inplace
221221
# is FALSE. For our use-case this is just not necessary and would cause unnecessary overhead in the mlr3
222222
# workhorse function
@@ -233,12 +233,12 @@ marshal_model.pipeop_learner_cv_plus_state = function(model, inplace = FALSE, ..
233233
}
234234

235235
#' @export
236-
unmarshal_model.pipeop_learner_cv_plus_state_marshaled = function(model, inplace = FALSE, ...) {
236+
unmarshal_model.pipeop_learner_pi_cvplus_state_marshaled = function(model, inplace = FALSE, ...) {
237237
state_marshaled = model$marshaled
238238
state_marshaled$cv_model_states = map(state_marshaled$cv_model_states, unmarshal_model, inplace = inplace)
239239
state_marshaled
240240
}
241241

242-
mlr_pipeops$add("learner_cv_plus", PipeOpLearnerCVPlus, list(R6Class("Learner", public = list(id = "learner_cv_plus", task_type = "regr", param_set = ps(), packages = "mlr3pipelines"))$new()))
242+
mlr_pipeops$add("learner_pi_cvplus", PipeOpLearnerPICVPlus, list(R6Class("Learner", public = list(id = "learner_pi_cvplus", task_type = "regr", param_set = ps(), packages = "mlr3pipelines"))$new()))
243243

244244

man/PipeOp.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/PipeOpEnsemble.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/PipeOpImpute.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/PipeOpTargetTrafo.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/PipeOpTaskPreproc.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/PipeOpTaskPreprocSimple.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)