Skip to content

Commit

Permalink
fixing typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mb706 committed Oct 28, 2019
1 parent 956525b commit 3e281f5
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion R/LearnerAvg.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' for `LearnerClassifAvg` and `regr.mse` for `LearnerRegrAvg`).
#' Learned weights can be obtained from `$model`.
#' Using non-linear optimization is implemented in the SuperLearner R package.
#' For a more detailed analysis the reader is refered to
#' For a more detailed analysis the reader is referred to
#' *LeDell, 2015: Scalable Ensemble Learning and Computationally Efficient Variance Estimation*.
#'
#' @section Parameter Set:
Expand Down
4 changes: 2 additions & 2 deletions R/PipeOp.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
#' @format Abstract [`R6Class`].
#'
#' @description
#' A [`PipeOp`] represents a tranformation of a given "input" into a given "output", with two stages: "training"
#' A [`PipeOp`] represents a transformation of a given "input" into a given "output", with two stages: "training"
#' and "prediction". It can be understood as a generalized function that not only has multiple inputs, but
#' also multiple outputs (as well as two stages). The "training" stage is used when training a machine learning pipeline or
#' fitting a statistical model, and the "predicting" stage is then used for making predictions
#' on new data.
#'
#' To perform training, the `$train()` function is called which takes inputs and tranforms them, while simultaneously storing information
#' To perform training, the `$train()` function is called which takes inputs and transforms them, while simultaneously storing information
#' in its `$state` slot. For prediction, the `$predict()` function is called, where the `$state` information can be used to influence the transformation
#' of the new data.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpClassBalancing.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#'
#' @description
#' Both undersamples a [`Task`][mlr3::Task] to keep only a fraction of the rows of the majority class,
#' as well as oversamples (repeats datapoints) rows of the minority class.
#' as well as oversamples (repeats data points) rows of the minority class.
#'
#' Sampling happens only during training phase. Class-balancing a [`Task`][mlr3::Task] by sampling may be
#' beneficial for classification with imbalanced training data.
Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpEnsemble.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#'
#' Should it be necessary to use the output of preceding [`Learner`][mlr3::Learner]s
#' during the "training" phase, then [`PipeOpEnsemble`] should not be used. In fact, if training time behaviour of a [`Learner`][mlr3::Learner] is important, then
#' one should use a [`PipeOpLearnerCV`] instead of a [`PipeOpLearner`], and the ensembling can be done by a [`Learner`][mlr3::Learner] encapsuled by a [`PipeOpLearner`].
#' one should use a [`PipeOpLearnerCV`] instead of a [`PipeOpLearner`], and the ensemble can be created with a [`Learner`][mlr3::Learner] encapsulated by a [`PipeOpLearner`].
#' See [`LearnerClassifAvg`] and [`LearnerRegrAvg`] for examples.
#'
#' @section Fields:
Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpImpute.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#' * `select_cols(task)` \cr
#' ([`Task`][mlr3::Task]) -> `character` \cr
#' Selects which columns the [`PipeOp`] operates on. In contrast to
#' the `affect_columns` parameter. `select_cols` is for the *ineriting class* to determine which columns
#' the `affect_columns` parameter. `select_cols` is for the *inheriting class* to determine which columns
#' the operator should function on, e.g. based on feature type, while `affect_columns` is a way for the *user*
#' to limit the columns that a [`PipeOpTaskPreproc`] should operate on.
#' * `train_imputer(feature, type, context)`\cr
Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpQuantileBin.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @section Input and Output Channels:
#' Input and output channels are inherited from [`PipeOpTaskPreproc`].
#'
#' The output is the input [`Task`][mlr3::Task] with all affected numeric features replaced by their binded versions.
#' The output is the input [`Task`][mlr3::Task] with all affected numeric features replaced by their binned versions.
#'
#' @section State:
#' The `$state` is a named `list` with the `$state` elements inherited from [`PipeOpTaskPreproc`], as well as:
Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpScale.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#' The mean of each numeric feature during training, or 0 if `center` is `FALSE`. Will be subtracted during the predict phase.
#' * `scale` :: `numeric`\cr
#' The root mean square, defined as `sqrt(sum(x^2)/(length(x)-1))`, of each feature during training, or 1 if `scale` is FALSE.
#' During predict phase, feaatures are divided by this.\cr
#' During predict phase, features are divided by this.\cr
#' This is 1 for features that are constant during training if `center` is `TRUE`, to avoid division-by-zero.
#'
#' @section Parameters:
Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpScaleRange.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @format [`R6Class`] object inheriting from [`PipeOpTaskPreprocSimple`]/[`PipeOpTaskPreproc`]/[`PipeOp`].
#'
#' @description
#' Linearily transforms numeric data columns so they are between `lower` and `upper`.
#' Linearly transforms numeric data columns so they are between `lower` and `upper`.
#' The formula for this is \eqn{x' = a + x * b},
#' where \eqn{b} is \eqn{(upper - lower) / (max(x) - min(x))} and
#' \eqn{a} is \eqn{-min(x) * b + lower}.
Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpTaskPreproc.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
#' ([`Task`][mlr3::Task]) -> `character` \cr
#' Selects which columns the [`PipeOp`] operates on, if `$train_dt()` and `$predict_dt()` are overloaded. This function
#' is not called if `$train_task()` and `$predict_task()` are overloaded. In contrast to
#' the `affect_columns` parameter. `select_cols` is for the *ineriting class* to determine which columns
#' the `affect_columns` parameter. `select_cols` is for the *inheriting class* to determine which columns
#' the operator should function on, e.g. based on feature type, while `affect_columns` is a way for the *user*
#' to limit the columns that a [`PipeOpTaskPreproc`] should operate on.\cr
#' This method can optionally be overloaded when inheriting [`PipeOpTaskPreproc`], together with `$train_dt()` and
Expand Down
4 changes: 2 additions & 2 deletions R/Selector.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' A [`Selector`] function is used by different [`PipeOp`]s, most prominently [`PipeOpSelect`] and many [`PipeOp`]s inheriting
#' from [`PipeOpTaskPreproc`], to determine a subset of [`Task`][mlr3::Task]s to operate on.
#'
#' Even though a [`Selector`] is a `function` that can be written itself, it is preferrable to use the [`Selector`] constructors
#' Even though a [`Selector`] is a `function` that can be written itself, it is preferable to use the [`Selector`] constructors
#' shown here. Each of these can be called with its arguments to create a [`Selector`], which can then be given to the [`PipeOpSelect`]
#' `selector` parameter, or many [`PipeOpTaskPreproc`]s' `affect_columns` parameter. See there for examples of this usage.
#'
Expand Down Expand Up @@ -38,7 +38,7 @@
#' }
#' ```
#'
#' It is preferrable to use the [`Selector`] construction functions like `select_type`, `select_grep` etc. if possible, instead of writing custom [`Selector`]s.
#' It is preferable to use the [`Selector`] construction functions like `select_type`, `select_grep` etc. if possible, instead of writing custom [`Selector`]s.
#'
#' @return `function`: A [`Selector`] function that takes a [`Task`][mlr3::Task] and returns the feature names to be processed.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/operators.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#'
#' Both arguments of `%>>%` are automatically converted to [`Graph`]s using [`as_graph()`]; this means that objects on either side may be objects
#' that can be automatically converted to [`PipeOp`]s (such as [`Learner`][mlr3::Learner]s or [`Filter`][mlr3filters::Filter]s), or that can
#' be converted to [`Graph`]s. This means, in particular, `list`s of [`Graph`]s, [`PipeOp`]s or objects convertable to that, because
#' be converted to [`Graph`]s. This means, in particular, `list`s of [`Graph`]s, [`PipeOp`]s or objects convertible to that, because
#' [`as_graph()`] automatically applies [`gunion()`] to `list`s. See examples.
#'
#' @param g1 ([`Graph`] | [`PipeOp`] | [`Learner`][mlr3::Learner] | [`Filter`][mlr3filters::Filter] | `list` | `...`) \cr
Expand Down
10 changes: 5 additions & 5 deletions R/typecheck.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ get_class_hierarchy = function(classname) {
#' whenever an S3 class's class hierarchy is important when inferring
#' compatibility between types.
#'
#' @param hierarchy `character` the class hieararchy to add; should
#' @param hierarchy `character` the class hierarchy to add; should
#' correspond to the `class()` of the lowest object in the hierarchy.
#' @return `NULL`
#' @family class hierarchy operations
Expand Down Expand Up @@ -163,7 +163,7 @@ reset_autoconvert_register = function() {
for (item in default_acr) {
# fill autoconvert register with given items
do.call(register_autoconvert_function, item)
# fill class hierarchy cache with info about autoconvertable classes
# fill class hierarchy cache with info about autoconvertible classes
get_class_hierarchy(item[[1]])
}
}
Expand Down Expand Up @@ -206,13 +206,13 @@ get_autoconverter = function(target) {

# now check if there is a subclass of `target` that we can convert to.
# for this we first get the class hierarchy cache entries corresponding to all possible autoconverters
# convertable_hierarchies is a `list` of `character`s;
# convertible_hierarchies is a `list` of `character`s;
# e.g. if there was a `TaskClassif` converter it could be c("TaskClassif", "Task")
convertable_hierarchies = mget(names(autoconvert_register), class_hierarchy_cache, ifnotfound = list(NULL))
convertible_hierarchies = mget(names(autoconvert_register), class_hierarchy_cache, ifnotfound = list(NULL))
# then we filter by all class hierarchies that actually contain `target`
superclass_hierarchies = Filter(function(x) {
target %in% x
}, convertable_hierarchies)
}, convertible_hierarchies)

if (length(superclass_hierarchies)) {
# if we found a class hierarchy entry we determine the one where `target` is at the earliest position,
Expand Down
4 changes: 2 additions & 2 deletions man/PipeOp.Rd

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

2 changes: 1 addition & 1 deletion man/PipeOpEnsemble.Rd

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

2 changes: 1 addition & 1 deletion man/PipeOpImpute.Rd

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

2 changes: 1 addition & 1 deletion man/PipeOpTaskPreproc.Rd

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

4 changes: 2 additions & 2 deletions man/Selector.Rd

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

2 changes: 1 addition & 1 deletion man/add_class_hierarchy_cache.Rd

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

2 changes: 1 addition & 1 deletion man/grapes-greater-than-greater-than-grapes.Rd

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

2 changes: 1 addition & 1 deletion man/mlr_learners_avg.Rd

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

2 changes: 1 addition & 1 deletion man/mlr_pipeops_classbalancing.Rd

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

2 changes: 1 addition & 1 deletion man/mlr_pipeops_quantilebin.Rd

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

2 changes: 1 addition & 1 deletion man/mlr_pipeops_scale.Rd

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

2 changes: 1 addition & 1 deletion man/mlr_pipeops_scalerange.Rd

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

0 comments on commit 3e281f5

Please sign in to comment.