PipeOpVIM_kNN {NADIA} | R Documentation |
PipeOpVIM_kNN
Description
Implements KNN methods as mlr3 pipeline, more about VIM_KNN autotune_VIM_kNN
.
Input and Output Channels
Input and output channels are inherited from PipeOpImpute
.
Parameters
The parameters include inherited from ['PipeOpImpute'], as well as:
-
id
::character(1)
Identifier of resulting object, default"imput_VIM_kNN"
. -
k
::intiger(1)
Threshold for convergence, default5
. -
numFUN
::function(){}
Function for aggregating the k Nearest Neighbours in the case of a numerical variable. Can be ever function with input=numeric_vector and output=atomic_object, defaultmedian
. -
catFUN
::function(){}
Function for aggregating the k Nearest Neighbours in case of categorical variables. It can be any function with input=not_numeric_vector and output=atomic_object, defaultVIM::maxCat
-
out_fill
::character(1)
Output log file location. If file already exists log message will be added. If NULL no log will be produced, defaultNULL
.
Super classes
mlr3pipelines::PipeOp
-> mlr3pipelines::PipeOpImpute
-> VIM_kNN_imputation
Methods
Public methods
Inherited methods
Method new()
Usage
PipeOpVIM_kNN$new( id = "impute_VIM_kNN_B", k = 5, numFun = median, catFun = VIM::maxCat, out_file = NULL )
Method clone()
The objects of this class are cloneable with this method.
Usage
PipeOpVIM_kNN$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
{
graph <- PipeOpVIM_kNN$new() %>>% mlr3learners::LearnerClassifGlmnet$new()
graph_learner <- GraphLearner$new(graph)
# Task with NA
resample(tsk("pima"), graph_learner, rsmp("cv", folds = 3))
}