Skip to content

Commit 88dfd31

Browse files
committed
update documentation for learners
1 parent c4d97eb commit 88dfd31

File tree

8 files changed

+222
-211
lines changed

8 files changed

+222
-211
lines changed

R/double_ml_iivm.R

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -138,42 +138,43 @@ DoubleMLIIVM = R6Class("DoubleMLIIVM",
138138
#' The `DoubleMLData` object providing the data and specifying the variables
139139
#' of the causal model.
140140
#'
141-
#' @param ml_g ([`LearnerRegr`][mlr3::LearnerRegr], `character(1)`) \cr
142-
#' An object of the class [mlr3 regression learner][mlr3::LearnerRegr] to
143-
#' pass a learner, possibly with specified parameters, for example
144-
#' `lrn("regr.cv_glmnet", s = "lambda.min")`.
145-
#' Alternatively, a `character(1)` specifying the name of a
146-
#' [mlr3 regression learner][mlr3::LearnerRegr] that is available in
147-
#' [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
148-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
149-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/),
150-
#' for example `"regr.cv_glmnet"`. \cr
141+
#' @param ml_g ([`LearnerRegr`][mlr3::LearnerRegr],
142+
#' [`Learner`][mlr3::Learner], `character(1)`) \cr
143+
#' A learner of the class [`LearnerRegr`][mlr3::LearnerRegr], which is
144+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
145+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
146+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
147+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
148+
#' `task_type = "regr"` can be passed, for example of class
149+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. The learner can possibly
150+
#' be passed with specified parameters, for example
151+
#' `lrn("regr.cv_glmnet", s = "lambda.min")`. \cr
151152
#' `ml_g` refers to the nuisance function \eqn{g_0(Z,X) = E[Y|X,Z]}.
152153
#'
153-
#' @param ml_m ([`LearnerClassif`][mlr3::LearnerClassif], `character(1)`) \cr
154-
#' An object of the class
155-
#' [mlr3 classification learner][mlr3::LearnerClassif] to pass a learner,
156-
#' possibly with specified parameters, for example
157-
#' `lrn("classif.cv_glmnet", s = "lambda.min")`.
158-
#' Alternatively, a `character(1)` specifying the name of
159-
#' a [mlr3 classification learner][mlr3::LearnerClassif] that is available
160-
#' in [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
161-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
162-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/),
163-
#' for example `"classif.cv_glmnet"`. \cr
154+
#' @param ml_m ([`LearnerClassif`][mlr3::LearnerClassif],
155+
#' [`Learner`][mlr3::Learner], `character(1)`) \cr
156+
#' A learner of the class [`LearnerClassif`][mlr3::LearnerClassif], which is
157+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
158+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
159+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
160+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
161+
#' `task_type = "classif"` can be passed, for example of class
162+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. The learner can possibly
163+
#' be passed with specified parameters, for example
164+
#' `lrn("classif.cv_glmnet", s = "lambda.min")`. \cr
164165
#' `ml_m` refers to the nuisance function \eqn{m_0(X) = E[Z|X]}.
165166
#'
166-
#' @param ml_r ([`LearnerClassif`][mlr3::LearnerClassif], `character(1)`) \cr
167-
#' An object of the class
168-
#' [mlr3 classification learner][mlr3::LearnerClassif] to pass a learner,
169-
#' possibly with specified parameters, for example
170-
#' `lrn("classif.cv_glmnet", s = "lambda.min")`.
171-
#' Alternatively, a `character(1)` specifying the name of a
172-
#' [mlr3 classification learner][mlr3::LearnerClassif] that is available in
173-
#' [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
174-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
175-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/),
176-
#' for example `"classif.cv_glmnet"`. \cr
167+
#' @param ml_r ([`LearnerClassif`][mlr3::LearnerClassif],
168+
#' [`Learner`][mlr3::Learner], `character(1)`) \cr
169+
#' A learner of the class [`LearnerClassif`][mlr3::LearnerClassif], which is
170+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
171+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
172+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
173+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
174+
#' `task_type = "classif"` can be passed, for example of class
175+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. The learner can possibly
176+
#' be passed with specified parameters, for example
177+
#' `lrn("classif.cv_glmnet", s = "lambda.min")`. \cr
177178
#' `ml_r` refers to the nuisance function \eqn{r_0(Z,X) = E[D|X,Z]}.
178179
#'
179180
#' @param n_folds (`integer(1)`)\cr

R/double_ml_irm.R

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -107,29 +107,30 @@ DoubleMLIRM = R6Class("DoubleMLIRM",
107107
#' The `DoubleMLData` object providing the data and specifying the variables
108108
#' of the causal model.
109109
#'
110-
#' @param ml_g ([`LearnerRegr`][mlr3::LearnerRegr], `character(1)`) \cr
111-
#' An object of the class [mlr3 regression learner][mlr3::LearnerRegr] to
112-
#' pass a learner, possibly with specified parameters, for example
113-
#' `lrn("regr.cv_glmnet", s = "lambda.min")`.
114-
#' Alternatively, a `character(1)` specifying the name of a
115-
#' [mlr3 regression learner][mlr3::LearnerRegr] that is available in
116-
#' [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
117-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
118-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/), for example
119-
#' `"regr.cv_glmnet"`. \cr
110+
#' @param ml_g ([`LearnerRegr`][mlr3::LearnerRegr],
111+
#' [`Learner`][mlr3::Learner], `character(1)`) \cr
112+
#' A learner of the class [`LearnerRegr`][mlr3::LearnerRegr], which is
113+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
114+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
115+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
116+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
117+
#' `task_type = "regr"` can be passed, for example of class
118+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. The learner can possibly
119+
#' be passed with specified parameters, for example
120+
#' `lrn("regr.cv_glmnet", s = "lambda.min")`. \cr
120121
#' `ml_g` refers to the nuisance function \eqn{g_0(X) = E[Y|X,D]}.
121122
#'
122-
#' @param ml_m ([`LearnerClassif`][mlr3::LearnerClassif], `character(1)`) \cr
123-
#' An object of the class
124-
#' [mlr3 classification learner][mlr3::LearnerClassif] to pass a learner,
125-
#' possibly with specified parameters, for example
126-
#' `lrn("classif.cv_glmnet", s = "lambda.min")`.
127-
#' Alternatively, a `character(1)` specifying the name of a
128-
#' [mlr3 classification learner][mlr3::LearnerClassif] that is available
129-
#' in [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
130-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
131-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/),
132-
#' for example `"classif.cv_glmnet"`. \cr
123+
#' @param ml_m ([`LearnerClassif`][mlr3::LearnerClassif],
124+
#' [`Learner`][mlr3::Learner], `character(1)`) \cr
125+
#' A learner of the class [`LearnerClassif`][mlr3::LearnerClassif], which is
126+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
127+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
128+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
129+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
130+
#' `task_type = "classif"` can be passed, for example of class
131+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. The learner can possibly
132+
#' be passed with specified parameters, for example
133+
#' `lrn("classif.cv_glmnet", s = "lambda.min")`. \cr
133134
#' `ml_m` refers to the nuisance function \eqn{m_0(X) = E[D|X]}.
134135
#'
135136
#' @param n_folds (`integer(1)`)\cr

R/double_ml_pliv.R

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -99,40 +99,43 @@ DoubleMLPLIV = R6Class("DoubleMLPLIV",
9999
#' The `DoubleMLData` object providing the data and specifying the variables
100100
#' of the causal model.
101101
#'
102-
#' @param ml_g ([`LearnerRegr`][mlr3::LearnerRegr], `character(1)`) \cr
103-
#' An object of the class [mlr3 regression learner][mlr3::LearnerRegr] to
104-
#' pass a learner, possibly with specified parameters, for example
105-
#' `lrn("regr.cv_glmnet", s = "lambda.min")`.
106-
#' Alternatively, a `character(1)` specifying the name of a
107-
#' [mlr3 regression learner][mlr3::LearnerRegr] that is available in
108-
#' [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
109-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
110-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/),
111-
#' for example `"regr.cv_glmnet"`. \cr
102+
#' @param ml_g ([`LearnerRegr`][mlr3::LearnerRegr],
103+
#' [`Learner`][mlr3::Learner], `character(1)`) \cr
104+
#' A learner of the class [`LearnerRegr`][mlr3::LearnerRegr], which is
105+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
106+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
107+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
108+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
109+
#' `task_type = "regr"` can be passed, for example of class
110+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. The learner can possibly
111+
#' be passed with specified parameters, for example
112+
#' `lrn("regr.cv_glmnet", s = "lambda.min")`. \cr
112113
#' `ml_g` refers to the nuisance function \eqn{g_0(X) = E[Y|X]}.
113114
#'
114-
#' @param ml_m ([`LearnerRegr`][mlr3::LearnerRegr], `character(1)`) \cr
115-
#' An object of the class [mlr3 regression learner][mlr3::LearnerRegr] to
116-
#' pass a learner, possibly with specified parameters, for example
117-
#' `lrn("regr.cv_glmnet", s = "lambda.min")`.
118-
#' Alternatively, a `character(1)` specifying the name of a
119-
#' [mlr3 regression learner][mlr3::LearnerRegr] that is available in
120-
#' [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
121-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
122-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/),
123-
#' for example `"regr.cv_glmnet"`. \cr
115+
#' @param ml_m ([`LearnerRegr`][mlr3::LearnerRegr],
116+
#' [`Learner`][mlr3::Learner], `character(1)`) \cr
117+
#' A learner of the class [`LearnerRegr`][mlr3::LearnerRegr], which is
118+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
119+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
120+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
121+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
122+
#' `task_type = "regr"` can be passed, for example of class
123+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. The learner can possibly
124+
#' be passed with specified parameters, for example
125+
#' `lrn("regr.cv_glmnet", s = "lambda.min")`. \cr
124126
#' `ml_m` refers to the nuisance function \eqn{m_0(X) = E[Z|X]}.
125127
#'
126-
#' @param ml_r ([`LearnerRegr`][mlr3::LearnerRegr], `character(1)`) \cr
127-
#' An object of the class [mlr3 regression learner][mlr3::LearnerRegr] to
128-
#' pass a learner, possibly with specified parameters, for example
129-
#' `lrn("regr.cv_glmnet", s = "lambda.min")`.
130-
#' Alternatively, a `character(1)` specifying the name of a
131-
#' [mlr3 regression learner][mlr3::LearnerRegr] that is available in
132-
#' [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
133-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
134-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/),
135-
#' for example `"regr.cv_glmnet"`. \cr
128+
#' @param ml_r ([`LearnerRegr`][mlr3::LearnerRegr],
129+
#' [`Learner`][mlr3::Learner], `character(1)`) \cr
130+
#' A learner of the class [`LearnerRegr`][mlr3::LearnerRegr], which is
131+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
132+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
133+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
134+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
135+
#' `task_type = "regr"` can be passed, for example of class
136+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. The learner can possibly
137+
#' be passed with specified parameters, for example
138+
#' `lrn("regr.cv_glmnet", s = "lambda.min")`. \cr
136139
#' `ml_r` refers to the nuisance function \eqn{r_0(X) = E[D|X]}.
137140
#'
138141
#' @param partialX (`logical(1)`) \cr

R/double_ml_plr.R

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -73,34 +73,34 @@ DoubleMLPLR = R6Class("DoubleMLPLR",
7373
#' The `DoubleMLData` object providing the data and specifying the
7474
#' variables of the causal model.
7575
#'
76-
#' @param ml_g ([`LearnerRegr`][mlr3::LearnerRegr], `character(1)`,) \cr
77-
#' An object of the class [mlr3 regression learner][mlr3::LearnerRegr]
78-
#' to pass a learner, possibly with specified parameters, for example
79-
#' `lrn("regr.cv_glmnet", s = "lambda.min")`.
80-
#' Alternatively, a `character(1)` specifying the name of a
81-
#' [mlr3 regression learner][mlr3::LearnerRegr] that is available in
82-
#' [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
83-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
84-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/),
85-
#' for example `"regr.cv_glmnet"`. \cr
76+
#' @param ml_g ([`LearnerRegr`][mlr3::LearnerRegr],
77+
#' [`Learner`][mlr3::Learner], `character(1)`) \cr
78+
#' A learner of the class [`LearnerRegr`][mlr3::LearnerRegr], which is
79+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
80+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
81+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
82+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
83+
#' `task_type = "regr"` can be passed, for example of class
84+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. The learner can possibly
85+
#' be passed with specified parameters, for example
86+
#' `lrn("regr.cv_glmnet", s = "lambda.min")`. \cr
8687
#' `ml_g` refers to the nuisance function \eqn{g_0(X) = E[Y|X]}.
8788
#'
8889
#' @param ml_m ([`LearnerRegr`][mlr3::LearnerRegr],
89-
#' [`LearnerClassif`][mlr3::LearnerClassif], `character(1)`,) \cr
90-
#' An object of the class [mlr3 regression learner][mlr3::LearnerRegr] to
91-
#' pass a learner, possibly with specified parameters, for example
92-
#' `lrn("regr.cv_glmnet", s = "lambda.min")`. For binary treatment
93-
#' variables, an object of the class
90+
#' [`LearnerClassif`][mlr3::LearnerClassif], [`Learner`][mlr3::Learner],
91+
#' `character(1)`) \cr
92+
#' A learner of the class [`LearnerRegr`][mlr3::LearnerRegr], which is
93+
#' available from [mlr3](https://mlr3.mlr-org.com/index.html) or its
94+
#' extension packages [mlr3learners](https://mlr3learners.mlr-org.com/) or
95+
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/).
96+
#' For binary treatment variables, an object of the class
9497
#' [`LearnerClassif`][mlr3::LearnerClassif] can be passed, for example
95-
#' `lrn("classif.cv_glmnet", s = "lambda.min")`. Alternatively, a
96-
#' `character(1)` specifying the name of a
97-
#' [mlr3 regression learner][mlr3::LearnerRegr] that is available in
98-
#' [mlr3](https://mlr3.mlr-org.com/index.html) or its extension packages
99-
#' [mlr3learners](https://mlr3learners.mlr-org.com/) or
100-
#' [mlr3extralearners](https://mlr3extralearners.mlr-org.com/), for example
101-
#' `"regr.cv_glmnet"`. \cr
98+
#' `lrn("classif.cv_glmnet", s = "lambda.min")`.
99+
#' Alternatively, a [`Learner`][mlr3::Learner] object with public field
100+
#' `task_type = "regr"` or `task_type = "classif"` can be passed,
101+
#' respectively, for example of class
102+
#' [`GraphLearner`][mlr3pipelines::GraphLearner]. \cr
102103
#' `ml_m` refers to the nuisance function \eqn{m_0(X) = E[D|X]}.
103-
104104
#'
105105
#' @param n_folds (`integer(1)`)\cr
106106
#' Number of folds. Default is `5`.

0 commit comments

Comments
 (0)