From e371b7471e2b476f9533f2f869c8eccdba5aefb1 Mon Sep 17 00:00:00 2001 From: Cesaire Joris Kuete Fouodo Date: Thu, 28 Nov 2024 09:57:30 +0100 Subject: [PATCH] Fix class of arguments --- R/Data.R | 20 +++++++-------- R/HashTable.R | 12 ++++----- R/Lrner.R | 28 ++++++++++----------- R/Model.R | 14 +++++------ R/PredictData.R | 6 ++--- R/PredictLayer.R | 4 +-- R/PredictMetaLayer.R | 4 +-- R/Predicting.R | 4 +-- R/Target.R | 6 ++--- R/TestData.R | 8 +++--- R/TestLayer.R | 5 ++-- R/TestMetaLayer.R | 4 +-- R/Testing.R | 6 ++--- R/TrainData.R | 6 ++--- R/TrainLayer.R | 16 ++++++------ R/TrainMetaLayer.R | 24 +++++++++--------- R/Training.R | 54 ++++++++++++++++++++--------------------- R/VarSel.R | 24 +++++++++--------- R/trainingFunctions.R | 2 +- man/Data.Rd | 20 +++++++-------- man/HashTable.Rd | 12 ++++----- man/Lrner.Rd | 28 ++++++++++----------- man/Model.Rd | 14 +++++------ man/PredictData.Rd | 6 ++--- man/PredictLayer.Rd | 4 +-- man/PredictMetaLayer.Rd | 4 +-- man/Predicting.Rd | 4 +-- man/Target.Rd | 6 ++--- man/TestData.Rd | 8 +++--- man/TestLayer.Rd | 4 +-- man/TestMetaLayer.Rd | 4 +-- man/Testing.Rd | 6 ++--- man/TrainData.Rd | 6 ++--- man/TrainLayer.Rd | 16 ++++++------ man/TrainMetaLayer.Rd | 24 +++++++++--------- man/Training.Rd | 52 +++++++++++++++++++-------------------- man/VarSel.Rd | 24 +++++++++--------- man/fusemlr.Rd | 2 +- 38 files changed, 245 insertions(+), 246 deletions(-) diff --git a/R/Data.R b/R/Data.R index d2af4d7..88e7a58 100644 --- a/R/Data.R +++ b/R/Data.R @@ -13,9 +13,9 @@ Data <- R6Class("Data", #' @description #' Constructor of class Data. #' - #' @param id (`character(1)`) \cr + #' @param id `character` \cr #' Object ID. - #' @param ind_col (`character(1)`) \cr + #' @param ind_col `character` \cr #' Column name containing individual IDs. #' @param data_frame \cr #' \code{data.frame} containing data. @@ -42,9 +42,9 @@ Data <- R6Class("Data", #' @description #' Retrieve a data subset for a given variable name and values, a data subset. #' - #' @param var_name (`character(1)`) \cr + #' @param var_name `character` \cr #' Variable name of interest. - #' @param value (`vector(n)`) \cr + #' @param value `vector` \cr #' Values of interest. #' #' @return @@ -63,9 +63,9 @@ Data <- R6Class("Data", #' Imputes missing values in modality-specific predictions. #' Only mode and median based imputations are actually supported. #' - #' @param impute_fct `character(1)` \cr + #' @param impute_fct `character` \cr #' An imputation function to use instead of median or mode imputation. Not yet implemented! - #' @param impute_param `list(1)` \cr + #' @param impute_param `list` \cr #' The list of parameters to call the imputation function. #' @return #' A new object with the predicted values is returned. @@ -104,7 +104,7 @@ Data <- R6Class("Data", #' @description #' Retrieve a subset of variables from data. #' - #' @param var_name (`character(n)`) \cr + #' @param var_name `character` \cr #' Variable names of interest. #' #' @return @@ -122,9 +122,9 @@ Data <- R6Class("Data", #' For the given variable name, non existing values in the #' current dataset are returned. #' - #' @param var_name `character(1)` \cr + #' @param var_name `character` \cr #' Variable name of interest. - #' @param value `vector(n)` \cr + #' @param value `vector` \cr #' Values of interest. #' #' @return @@ -155,7 +155,7 @@ Data <- R6Class("Data", #' @description #' Set a new \code{data.frame} to the current object. #' - #' @param data_frame `data.frame(1)` + #' @param data_frame `data.frame` #' #' @return #' The current object is returned. diff --git a/R/HashTable.R b/R/HashTable.R index 46ef32b..4407764 100644 --- a/R/HashTable.R +++ b/R/HashTable.R @@ -10,7 +10,7 @@ HashTable <- R6Class("HashTable", #' @description #' Initialize a default parameters list. #' - #' @param id (`character(1)`) \cr + #' @param id `character` \cr #' ID of the hash table. It must be unique. #' #' @export @@ -35,11 +35,11 @@ HashTable <- R6Class("HashTable", }, #' @description #' Function to add a key-value pair to the hash table. - #' @param key (`character(1)`) \cr + #' @param key `character` \cr #' The key to be added. - #' @param value (`object(1)`) \cr + #' @param value `object` \cr #' Object to be added. - #' @param .class (`character(1)`) \cr + #' @param .class `character` \cr #' Class of the object to be added. #' @export #' @@ -64,7 +64,7 @@ HashTable <- R6Class("HashTable", #' @description #' Getter of the object which the key passed as argument. #' - #' @param key `character()` \cr + #' @param key `character` \cr #' Key of the required object. #' #' @export @@ -124,7 +124,7 @@ HashTable <- R6Class("HashTable", #' @description #' Check whether object from a class has already been stored. #' - #' @param .class `character()` \cr + #' @param .class `character` \cr #' #' @return #' Boolean value diff --git a/R/Lrner.R b/R/Lrner.R index 75b1cba..eaeb96d 100644 --- a/R/Lrner.R +++ b/R/Lrner.R @@ -14,21 +14,21 @@ Lrner <- R6Class("Lrner", #' #' #' - #' @param id (`character(1)`) \cr + #' @param id `character` \cr #' Learner ID. - #' @param package (`character(1)`) \cr + #' @param package `character` \cr #' Package that implements the learn function. If NULL, the - #' @param lrn_fct (`character(1)`) \cr + #' @param lrn_fct `character` \cr #' learn function is called from the current environment. - #' @param param_train_list \cr + #' @param param_train_list `list` \cr #' List of parameter for training. - #' @param param_pred_list \cr + #' @param param_pred_list `list` \cr #' List of parameter for testing. #' Learn parameters. - #' @param train_layer (`TrainLayer(1)`) \cr + #' @param train_layer `TrainLayer` \cr #' Layer on which the learner is stored. - #' @param na_action `character(1)`\cr + #' @param na_action `character` \cr #' Handling of missing values. Set to "na.keep" to keep missing values, "na.rm" to remove individuals with missing values or "na.impute" (only applicable on meta-data) to impute missing values in meta-data. Only median and mode based imputations are actually handled. With the "na.keep" option, ensure that the provided learner can handle missing values. initialize = function (id, package = NULL, @@ -115,15 +115,15 @@ Lrner <- R6Class("Lrner", #' to provide how the following parameters are named in the learning #' function (\code{lrn_fct}) you provided when creating the learner, or in the predicting function. #' - #' @param x (`character(1)`) \cr + #' @param x `character` \cr #' Name of the argument to pass the matrix of independent variables in the original learning function. - #' @param y (`character(1)`) \cr + #' @param y `character` \cr #' Name of the argument to pass the response variable in the original learning function. - #' @param object (`character(1)`) \cr + #' @param object `character` \cr #' Name of the argument to pass the model in the original predicting function. #' @param data \cr #' Name of the argument to pass new data in the original predicting function. - #' @param extract_pred_fct (`character(1) or function(1)`) \cr + #' @param extract_pred_fct `character` or `function` \cr #' If the predict function that is called for the model does not return a vector, then #' use this argument to specify a (or a name of a) function that can be used to extract vector of predictions. #' Default value is NULL, if predictions are in a vector. @@ -166,11 +166,11 @@ Lrner <- R6Class("Lrner", #' @description #' Tains the current learner (from class [Lrner]) on the current training data (from class [TrainData]). #' - #' @param ind_subset `vector(1)` \cr + #' @param ind_subset `vector` \cr #' Individual ID subset on which the training will be performed. - #' @param use_var_sel `boolean(1)` \cr + #' @param use_var_sel `boolean` \cr #' If TRUE, variable selection is performed before training. - #' @param verbose (`boolean`) \cr + #' @param verbose `boolean` \cr #' Warning messages will be displayed if set to TRUE. #' #' @return diff --git a/R/Model.R b/R/Model.R index 3ce0183..2d723fd 100644 --- a/R/Model.R +++ b/R/Model.R @@ -16,13 +16,13 @@ Model <- R6Class("Model", #' @description #' Constructor of Model class. #' - #' @param lrner (`Lrner(1)`) \cr + #' @param lrner `Lrner` \cr #' The learner. - #' @param train_data (`TrainData(1)`) \cr + #' @param train_data `TrainData(1)` \cr #' Training data. - #' @param base_model (`object(1)`) \cr + #' @param base_model `object` \cr #' Base model as returned by the original learn function. - #' @param train_layer (`TrainLayer(1)`) \cr + #' @param train_layer `TrainLayer` \cr #' The current training layer on which the model is stored. #' #' @return @@ -124,11 +124,11 @@ Model <- R6Class("Model", #' Predict target values for the new data #' (from class [TestData]) taken as into. #' - #' @param testing_data `TestData(1)` \cr + #' @param testing_data `TestData` \cr #' An object from class [TestData]. - #' @param use_var_sel `boolean(1)` \cr + #' @param use_var_sel `boolean` \cr #' If TRUE, selected variables available at each layer are used. - #' @param ind_subset `vector(1)` \cr + #' @param ind_subset `vector` \cr #' Subset of individual IDs to be predicted. #' @param ... #' Further parameters to be passed to the basic predict function. diff --git a/R/PredictData.R b/R/PredictData.R index 9ce0264..6a2b3ce 100644 --- a/R/PredictData.R +++ b/R/PredictData.R @@ -12,11 +12,11 @@ PredictData <- R6Class("PredictData", #' @description #' Initialize a new object from the current class. #' - #' @param id (`character(1)`) \cr + #' @param id `character` \cr #' Object ID. - #' @param ind_col (`character(1)`)\cr + #' @param ind_col `character`\cr #' Column name containing individual IDs. - #' @param data_frame (`data.frame(1)`)\cr + #' @param data_frame `data.frame`\cr #' \code{data.frame} containing data. initialize = function (id, ind_col, diff --git a/R/PredictLayer.R b/R/PredictLayer.R index fe03790..5d84c2a 100644 --- a/R/PredictLayer.R +++ b/R/PredictLayer.R @@ -15,7 +15,7 @@ PredictLayer <- R6Class("PredictLayer", #' @description #' constructor #' - #' @param id (`character(1)`) \cr + #' @param id `character` \cr #' The layer ID. initialize = function (id) { super$initialize(id = id) @@ -80,7 +80,7 @@ PredictLayer <- R6Class("PredictLayer", #' @description #' Assigns a predicting object to the predicted layer. #' - #' @param predicting `Predicting(1)` \cr + #' @param predicting `Predicting` \cr #' #' @return #' The current object diff --git a/R/PredictMetaLayer.R b/R/PredictMetaLayer.R index 877470b..4b09633 100644 --- a/R/PredictMetaLayer.R +++ b/R/PredictMetaLayer.R @@ -13,8 +13,8 @@ PredictMetaLayer <- R6Class("PredictMetaLayer", #' @description #' constructor #' - #' @param id (`character(1)`)\cr - #' @param predicting (`Predicting(1)`)\cr + #' @param id `character`\cr + #' @param predicting `Predicting`\cr #' initialize = function (id, predicting) { super$initialize(id = id) diff --git a/R/Predicting.R b/R/Predicting.R index 0c1fb6c..d382a14 100644 --- a/R/Predicting.R +++ b/R/Predicting.R @@ -23,9 +23,9 @@ Predicting <- R6Class("Predicting", #' @description #' constructor #' - #' @param id (`character(1)`)\cr + #' @param id `character`\cr #' Predicting id. - #' @param ind_col (`character(1L)`) + #' @param ind_col `character` #' Name of column of individuals IDS initialize = function (id, ind_col) { super$initialize(id = id) diff --git a/R/Target.R b/R/Target.R index 334818a..d0f2446 100644 --- a/R/Target.R +++ b/R/Target.R @@ -14,11 +14,11 @@ Target <- R6Class("Target", #' @description #' Initialize a new object from the current class. #' - #' @param id (`character(1)`) \cr + #' @param id `character` \cr #' The Object ID. - #' @param data_frame (`data.frame(1)`)\cr + #' @param data_frame `data.frame`\cr #' \code{data.frame} containing data. - #' @param training (`Training(1)`) \cr + #' @param training `Training` \cr #' Training where to store the current object. initialize = function (id, data_frame, diff --git a/R/TestData.R b/R/TestData.R index 7e2ada3..19a4632 100644 --- a/R/TestData.R +++ b/R/TestData.R @@ -12,13 +12,13 @@ TestData <- R6Class("TestData", #' @description #' Initialize a new object from the current class. #' - #' @param id (`character(1)`) \cr + #' @param id `character` \cr #' Object ID. - #' @param ind_col (`character(1)`)\cr + #' @param ind_col `character`\cr #' Column name containing individual IDs. - #' @param data_frame (`data.frame(1)`)\cr + #' @param data_frame `data.frame`\cr #' \code{data.frame} containing data. - #' @param new_layer (`TestLayer(1)`) \cr + #' @param new_layer `TestLayer` \cr #' Layer where to store the current object. # TODO: rename new_layer by test_layer initialize = function (id, diff --git a/R/TestLayer.R b/R/TestLayer.R index 05a3c75..68871ab 100644 --- a/R/TestLayer.R +++ b/R/TestLayer.R @@ -15,9 +15,9 @@ TestLayer <- R6Class("TestLayer", #' @description #' constructor #' - #' @param id (`character(1)`)\cr + #' @param id `character`\cr #' Testing layer id. - #' @param testing (`Testing(1)`)\cr + #' @param testing `Testing`\cr #' initialize = function (id, testing) { super$initialize(id = id) @@ -113,6 +113,5 @@ TestLayer <- R6Class("TestLayer", private = list( testing = NULL ), - # TODO: define a deep_clone function for this class. cloneable = FALSE ) diff --git a/R/TestMetaLayer.R b/R/TestMetaLayer.R index 22bf1dd..1789184 100644 --- a/R/TestMetaLayer.R +++ b/R/TestMetaLayer.R @@ -13,9 +13,9 @@ TestMetaLayer <- R6Class("TestMetaLayer", #' @description #' constructor #' - #' @param id (`character(1)`)\cr + #' @param id `character`\cr #' Testing meta-layer id. - #' @param testing (`Testing(1)`)\cr + #' @param testing `Testing`\cr #' initialize = function (id, testing) { super$initialize(id = id) diff --git a/R/Testing.R b/R/Testing.R index 03d84db..5118a07 100644 --- a/R/Testing.R +++ b/R/Testing.R @@ -19,11 +19,11 @@ Testing <- R6Class("Testing", #' @description #' constructor #' - #' @param id (`character(1)`)\cr + #' @param id `character`\cr #' Testing id. - #' @param ind_col (`character(1)`) + #' @param ind_col `character` #' Name of column of individuals IDS in testing data.frame. - #' @param verbose (`boolean`) \cr + #' @param verbose `boolean` \cr #' Warning messages will be displayed if set to TRUE. initialize = function (id, ind_col, verbose = TRUE) { super$initialize(id = id) diff --git a/R/TrainData.R b/R/TrainData.R index 84fd4ea..adaea54 100644 --- a/R/TrainData.R +++ b/R/TrainData.R @@ -14,11 +14,11 @@ TrainData <- R6Class("TrainData", #' @description #' Initialize a new object from the current class. #' - #' @param id (`character(1)`) \cr + #' @param id `character` \cr #' The Object ID. - #' @param data_frame (`data.frame(1)`)\cr + #' @param data_frame `data.frame`\cr #' \code{data.frame} containing data. - #' @param train_layer (`TrainLayer(1)`) \cr + #' @param train_layer `TrainLayer` \cr #' Training layer where to store the current object. initialize = function (id, data_frame, diff --git a/R/TrainLayer.R b/R/TrainLayer.R index 8243eed..f114ec8 100644 --- a/R/TrainLayer.R +++ b/R/TrainLayer.R @@ -23,9 +23,9 @@ TrainLayer <- R6Class("TrainLayer", #' @description #' constructor #' - #' @param id (`character(1)`)\cr + #' @param id `character`\cr #' Training layer id. - #' @param training (`Training(1)`)\cr + #' @param training `Training`\cr #' initialize = function (id, training) { super$initialize(id = id) @@ -78,11 +78,11 @@ TrainLayer <- R6Class("TrainLayer", #' @description #' Trains the current layer. #' - #' @param ind_subset `vector(1)` \cr + #' @param ind_subset `vector` \cr #' ID subset of individuals to be used for training. - #' @param use_var_sel `boolean(1)` \cr + #' @param use_var_sel `boolean` \cr #' If TRUE, variable selection is performed before training. - #' @param verbose (`boolean`) \cr + #' @param verbose `boolean` \cr #' Warning messages will be displayed if set to TRUE. #' #' @return @@ -133,9 +133,9 @@ TrainLayer <- R6Class("TrainLayer", #' @description #' Variable selection on the current layer. #' - #' @param ind_subset `vector(1)` \cr + #' @param ind_subset `vector` \cr #' ID subset of individuals to be used for variable selection. - #' @param verbose (`boolean`) \cr + #' @param verbose `boolean` \cr #' Warning messages will be displayed if set to TRUE. #' #' @return @@ -172,7 +172,7 @@ TrainLayer <- R6Class("TrainLayer", #' Predicts values for the new layer taking as argument. #' #' @param new_layer `TrainLayer` \cr - #' @param use_var_sel `boolean(1)` \cr + #' @param use_var_sel `boolean` \cr #' If TRUE, selected variables available at each layer are used. #' @param ind_subset `vector` \cr #' diff --git a/R/TrainMetaLayer.R b/R/TrainMetaLayer.R index eef1f12..1dd404f 100644 --- a/R/TrainMetaLayer.R +++ b/R/TrainMetaLayer.R @@ -21,9 +21,9 @@ TrainMetaLayer <- R6Class("TrainMetaLayer", #' @description #' constructor #' - #' @param id (`character(1)`)\cr + #' @param id `character`\cr #' Id of training meta-layer. - #' @param training (`Training(1)`)\cr + #' @param training `Training`\cr #' initialize = function (id, training) { super$initialize(id = id) @@ -71,9 +71,9 @@ TrainMetaLayer <- R6Class("TrainMetaLayer", #' @description #' Trains the current layer. #' - #' @param ind_subset `vector(1)` \cr + #' @param ind_subset `vector` \cr #' ID subset of individuals to be used for training. - #' @param verbose (`boolean`) \cr + #' @param verbose `boolean` \cr #' Warning messages will be displayed if set to TRUE. #' #' @return @@ -109,8 +109,8 @@ TrainMetaLayer <- R6Class("TrainMetaLayer", #' @description #' Predicts values for the new layer taking as argument. #' - #' @param new_layer `TrainLayer(1)` \cr - #' @param ind_subset `vector(1)` \cr + #' @param new_layer `TrainLayer` \cr + #' @param ind_subset `vector` \cr #' #' @return #' A new object with the predicted values is returned. @@ -149,11 +149,11 @@ TrainMetaLayer <- R6Class("TrainMetaLayer", #' Imputes missing values in modality-specific predictions. #' Only mode and median based imputations are actually supported. #' - #' @param impute_fct `character(1)` \cr + #' @param impute_fct `character` \cr #' An imputation function to use instead of median or mode imputation. #' This parameter is actually not used. #' This corresponds to median or mode based imputation. - #' @param impute_param `list(1)` \cr + #' @param impute_param `list` \cr #' The list of parameters to call the imputation function. Not yet implemented! #' @return #' A new object with the predicted values is returned. @@ -247,13 +247,13 @@ TrainMetaLayer <- R6Class("TrainMetaLayer", #' Create and set an [TrainData] object to the current #' meta learner. #' - #' @param id `character(1)` \cr + #' @param id `character` \cr #' ID of the [TrainData] object to be instanciated. - #' @param ind_col `character(1)` \cr + #' @param ind_col `character` \cr #' Name of individual column IDs. - #' @param data_frame `data.frame(1)` \cr + #' @param data_frame `data.frame` \cr #' \code{data.frame} of layer specific predictions. - #' @param target `character(1)` \cr + #' @param target `character` \cr #' Name of the target variable #' #' @export diff --git a/R/Training.R b/R/Training.R index 29ac048..5e2caa2 100644 --- a/R/Training.R +++ b/R/Training.R @@ -27,16 +27,16 @@ Training <- R6Class("Training", #' @description #' constructor #' - #' @param id (`character(1)`) \cr - #' @param ind_col (`character(1)`) \cr + #' @param id `character` \cr + #' @param ind_col `character` \cr #' Name of column of individuals IDS. - #' @param target (`character(1)`) \cr + #' @param target `character` \cr #' Name of the target variable. - #' @param target_df (`data.frame(1)`) \cr + #' @param target_df `data.frame` \cr #' Data frame with two columns: individual IDs and response variable values. - #' @param problem_type (`character`) \cr + #' @param problem_type `character` \cr #' Either "classification" or "regression". - #' @param verbose (`boolean`) \cr + #' @param verbose `boolean` \cr #' Warning messages will be displayed if set to TRUE. #' @seealso [Testing] and [Predicting] initialize = function (id, @@ -106,7 +106,7 @@ Training <- R6Class("Training", } } cat(sprintf("Training : %s\n", private$id)) - cat(sprintf("Problem typ : %s\n", private$problem_typ)) + cat(sprintf("Problem type : %s\n", private$problem_typ)) cat(sprintf("Status : %s\n", status)) cat(sprintf("Number of layers: %s\n", nb_layers)) cat(sprintf("Layers trained : %s\n", private$nb_trained_layer)) @@ -142,9 +142,9 @@ Training <- R6Class("Training", #' @description #' Train each layer of the current Training. #' - #' @param ind_subset (`character(1)`)\cr + #' @param ind_subset `character`\cr #' Subset of individuals IDs to be used for training. - #' @param use_var_sel `boolean(1)` \cr + #' @param use_var_sel `boolean` \cr #' If TRUE, selected variables available at each layer are used. #' @return #' Returns the object itself, with a model for each layer. @@ -172,9 +172,9 @@ Training <- R6Class("Training", #' @description #' Predicts values given new data. #' - #' @param testing (`TestData(1)`) \cr + #' @param testing `TestData` \cr #' Object of class [TestData]. - #' @param ind_subset (`vector(1)`) \cr + #' @param ind_subset `vector` \cr #' Subset of individuals IDs to be used for training. #' #' @return @@ -206,13 +206,13 @@ Training <- R6Class("Training", #' Creates a meta training dataset and assigns it to the meta layer. #' #' - #' @param resampling_method (`function(1)`) \cr + #' @param resampling_method `function` \cr #' Function for internal validation. - #' @param resampling_arg (`list(1)`) \cr + #' @param resampling_arg `list` \cr #' List of arguments to be passed to the function. - #' @param use_var_sel `boolean(1)` \cr + #' @param use_var_sel `boolean` \cr #' If TRUE, selected variables available at each layer are used. - #' @param impute (`boolean`) \cr + #' @param impute `boolean` \cr #' If TRUE, mode or median based imputation is performed on the modality-specific predictions. #' #' @return @@ -297,15 +297,15 @@ Training <- R6Class("Training", #' @description #' Trains the current object. All leaners and the meta learner are trained. #' - #' @param ind_subset (`vector(1)`) \cr + #' @param ind_subset `vector` \cr #' ID subset to be used for training. - #' @param use_var_sel `boolean(1)` \cr + #' @param use_var_sel `boolean` \cr #' If TRUE, variable selection is performed before training. - #' @param resampling_method (`function(1)`) \cr + #' @param resampling_method `function` \cr #' Function for internal validation. If not specify, the \code{resampling} function from the package \code{caret} is used for a 10-folds cross-validation. - #' @param resampling_arg (`list(1)`) \cr + #' @param resampling_arg `list` \cr #' List of arguments to be passed to the function. - #' @param seed (`integer(1)`) \cr + #' @param seed `integer` \cr #' Random seed. Default is NULL, which generates the seed from \code{R}. #' #' @return @@ -353,9 +353,9 @@ Training <- R6Class("Training", #' @description #' Compute predictions for a testing object. #' - #' @param testing (`Testing(1)`) \cr + #' @param testing `Testing` \cr #' A new testing object to be predicted. - #' @param ind_subset (`vector(1)`) \cr + #' @param ind_subset `vector` \cr #' Vector of IDs to be predicted. #' #' @return @@ -437,9 +437,9 @@ Training <- R6Class("Training", #' @description #' Variable selection on the current training object. #' - #' @param ind_subset `vector(1)` \cr + #' @param ind_subset `vector` \cr #' ID subset of individuals to be used for variable selection. - #' @param verbose (`boolean`) \cr + #' @param verbose `boolean` \cr #' Warning messages will be displayed if set to TRUE. #' #' @return @@ -521,7 +521,7 @@ Training <- R6Class("Training", #' @description #' Get a layer of a given ID. #' - #' @param id `character(1)` \cr + #' @param id `character` \cr #' The ID of the layer to be returned. #' #' @return @@ -586,7 +586,7 @@ Training <- R6Class("Training", #' @description #' Remove a layer of a given ID. #' - #' @param id `character(1)` \cr + #' @param id `character` \cr #' The ID of the layer to be removed. #' #' @return @@ -667,7 +667,7 @@ Training <- R6Class("Training", #' @description #' Set imputation action na.action. #' - #' @param impute `character(1)` \cr + #' @param impute `character` \cr #' How to handle missing values. #' setImpute = function(impute) { diff --git a/R/VarSel.R b/R/VarSel.R index 70965f8..8a71112 100644 --- a/R/VarSel.R +++ b/R/VarSel.R @@ -14,19 +14,19 @@ VarSel <- R6Class("VarSel", #' #' #' Learner ID. - #' @param id (`character(1)`) \cr + #' @param id `character` \cr #' Package that implements the variable selection function. #' If NULL, the variable selection function is called from #' the current environment. - #' @param package (`character(1)`) \cr + #' @param package `character` \cr #' Variable selection function name. Note: Variable selection functions, except \code{Boruta}, must return a vector of selected variables. - #' @param varsel_fct (`character(1)`) \cr + #' @param varsel_fct `character` \cr #' Variable selection parameters. - #' @param varsel_param (`list(1)`) \cr + #' @param varsel_param `list` \cr #' Layer on which the learner is stored. - #' @param train_layer (`TrainLayer(1)`) \cr + #' @param train_layer `TrainLayer` \cr #' The training layer where to store the learner. - #' @param na_action `character(1)`\cr + #' @param na_action `character` \cr #' Handling of missing values in meta-data. Set to "na.keep" to keep missing values, "na.rm" to remove individuals with missing values or "na.impute" (only applicable on meta-data) to impute missing values in meta-data. Only median and mode based imputations are actually handled. With the "na.keep" option, ensure that the provided learner can handle missing values. #' If \code{TRUE}, the individuals with missing predictor values will be removed from the training dataset. initialize = function (id, @@ -104,15 +104,15 @@ VarSel <- R6Class("VarSel", #' to provide how the following parameters are named in the learning #' function (\code{lrn_fct}) you provided when creating the learner, or in the predicting function. #' - #' @param x (`string`(1)) \cr + #' @param x `string` \cr #' Name of the argument to pass the matrix of independent variables in the original learning function. - #' @param y (`string`(1)) \cr + #' @param y `string` \cr #' Name of the argument to pass the response variable in the original learning function. - #' @param object (`string`(1)) \cr + #' @param object `string` \cr #' Name of the argument to pass the model in the original predicting function. - #' @param data \cr + #' @param data `character` \cr #' Name of the argument to pass new data in the original predicting function. - #' @param extract_var_fct (`character(1) or function(1)`) \cr + #' @param extract_var_fct `character` or `function` \cr #' If the variable selection function that is called does not return a vector, then #' use this argument to specify a (or a name of a) function that can be used to extract vector of selected variables. #' Default value is NULL, if selected variables are in a vector. @@ -155,7 +155,7 @@ VarSel <- R6Class("VarSel", #' @description #' Tains the current learner (from class [Lrner]) on the current training data (from class [TrainData]). #' - #' @param ind_subset `vector(1)` \cr + #' @param ind_subset `vector` \cr #' Individual ID subset on which the training will be performed. #' #' @return diff --git a/R/trainingFunctions.R b/R/trainingFunctions.R index 3a3f2d2..023fa3b 100644 --- a/R/trainingFunctions.R +++ b/R/trainingFunctions.R @@ -253,7 +253,7 @@ varSelection = function (training, #' Function for internal validation. If not specify, the \code{resampling} function from the package \code{caret} is used for a 10-folds cross-validation. #' @param resampling_arg `list` \cr #' List of arguments to be passed to the function. -#' @param seed (`integer`) \cr +#' @param seed `integer` \cr #' Random seed used for resampling. Default is NULL, which generates the seed from \code{R}. #' #' @return diff --git a/man/Data.Rd b/man/Data.Rd index 33316cd..72f20e6 100644 --- a/man/Data.Rd +++ b/man/Data.Rd @@ -40,10 +40,10 @@ Constructor of class Data. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr +\item{\code{id}}{\code{character} \cr Object ID.} -\item{\code{ind_col}}{(\code{character(1)}) \cr +\item{\code{ind_col}}{\code{character} \cr Column name containing individual IDs.} \item{\code{data_frame}}{\cr @@ -81,10 +81,10 @@ Retrieve a data subset for a given variable name and values, a data subset. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{var_name}}{(\code{character(1)}) \cr +\item{\code{var_name}}{\code{character} \cr Variable name of interest.} -\item{\code{value}}{(\code{vector(n)}) \cr +\item{\code{value}}{\code{vector} \cr Values of interest.} } \if{html}{\out{
}} @@ -106,10 +106,10 @@ Only mode and median based imputations are actually supported. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{impute_fct}}{\code{character(1)} \cr +\item{\code{impute_fct}}{\code{character} \cr An imputation function to use instead of median or mode imputation. Not yet implemented!} -\item{\code{impute_param}}{\code{list(1)} \cr +\item{\code{impute_param}}{\code{list} \cr The list of parameters to call the imputation function.} } \if{html}{\out{
}} @@ -130,7 +130,7 @@ Retrieve a subset of variables from data. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{var_name}}{(\code{character(n)}) \cr +\item{\code{var_name}}{\code{character} \cr Variable names of interest.} } \if{html}{\out{
}} @@ -152,10 +152,10 @@ current dataset are returned. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{var_name}}{\code{character(1)} \cr +\item{\code{var_name}}{\code{character} \cr Variable name of interest.} -\item{\code{value}}{\code{vector(n)} \cr +\item{\code{value}}{\code{vector} \cr Values of interest.} } \if{html}{\out{
}} @@ -189,7 +189,7 @@ Set a new \code{data.frame} to the current object. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{data_frame}}{\code{data.frame(1)}} +\item{\code{data_frame}}{\code{data.frame}} } \if{html}{\out{
}} } diff --git a/man/HashTable.Rd b/man/HashTable.Rd index 86f878c..ee79b03 100644 --- a/man/HashTable.Rd +++ b/man/HashTable.Rd @@ -32,7 +32,7 @@ Initialize a default parameters list. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr +\item{\code{id}}{\code{character} \cr ID of the hash table. It must be unique.} } \if{html}{\out{
}} @@ -67,13 +67,13 @@ Function to add a key-value pair to the hash table. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{key}}{(\code{character(1)}) \cr +\item{\code{key}}{\code{character} \cr The key to be added.} -\item{\code{value}}{(\code{object(1)}) \cr +\item{\code{value}}{\code{object} \cr Object to be added.} -\item{\code{.class}}{(\code{character(1)}) \cr +\item{\code{.class}}{\code{character} \cr Class of the object to be added.} } \if{html}{\out{
}} @@ -91,7 +91,7 @@ Getter of the object which the key passed as argument. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{key}}{\code{character()} \cr +\item{\code{key}}{\code{character} \cr Key of the required object.} } \if{html}{\out{
}} @@ -159,7 +159,7 @@ Check whether object from a class has already been stored. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{.class}}{\code{character()} \cr} +\item{\code{.class}}{\code{character} \cr} } \if{html}{\out{
}} } diff --git a/man/Lrner.Rd b/man/Lrner.Rd index 14f39d6..0f45760 100644 --- a/man/Lrner.Rd +++ b/man/Lrner.Rd @@ -46,26 +46,26 @@ Initialize a default parameters list. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr +\item{\code{id}}{\code{character} \cr Learner ID.} -\item{\code{package}}{(\code{character(1)}) \cr +\item{\code{package}}{\code{character} \cr Package that implements the learn function. If NULL, the} -\item{\code{lrn_fct}}{(\code{character(1)}) \cr +\item{\code{lrn_fct}}{\code{character} \cr learn function is called from the current environment.} -\item{\code{param_train_list}}{\cr +\item{\code{param_train_list}}{\code{list} \cr List of parameter for training.} -\item{\code{param_pred_list}}{\cr +\item{\code{param_pred_list}}{\code{list} \cr List of parameter for testing. Learn parameters.} -\item{\code{train_layer}}{(\code{TrainLayer(1)}) \cr +\item{\code{train_layer}}{\code{TrainLayer} \cr Layer on which the learner is stored.} -\item{\code{na_action}}{\code{character(1)}\cr +\item{\code{na_action}}{\code{character} \cr Handling of missing values. Set to "na.keep" to keep missing values, "na.rm" to remove individuals with missing values or "na.impute" (only applicable on meta-data) to impute missing values in meta-data. Only median and mode based imputations are actually handled. With the "na.keep" option, ensure that the provided learner can handle missing values.} } \if{html}{\out{
}} @@ -125,19 +125,19 @@ function (\code{lrn_fct}) you provided when creating the learner, or in the pred \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{x}}{(\code{character(1)}) \cr +\item{\code{x}}{\code{character} \cr Name of the argument to pass the matrix of independent variables in the original learning function.} -\item{\code{y}}{(\code{character(1)}) \cr +\item{\code{y}}{\code{character} \cr Name of the argument to pass the response variable in the original learning function.} -\item{\code{object}}{(\code{character(1)}) \cr +\item{\code{object}}{\code{character} \cr Name of the argument to pass the model in the original predicting function.} \item{\code{data}}{\cr Name of the argument to pass new data in the original predicting function.} -\item{\code{extract_pred_fct}}{(\verb{character(1) or function(1)}) \cr +\item{\code{extract_pred_fct}}{\code{character} or \code{function} \cr If the predict function that is called for the model does not return a vector, then use this argument to specify a (or a name of a) function that can be used to extract vector of predictions. Default value is NULL, if predictions are in a vector.} @@ -157,13 +157,13 @@ Tains the current learner (from class \link{Lrner}) on the current training data \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{ind_subset}}{\code{vector(1)} \cr +\item{\code{ind_subset}}{\code{vector} \cr Individual ID subset on which the training will be performed.} -\item{\code{use_var_sel}}{\code{boolean(1)} \cr +\item{\code{use_var_sel}}{\code{boolean} \cr If TRUE, variable selection is performed before training.} -\item{\code{verbose}}{(\code{boolean}) \cr +\item{\code{verbose}}{\code{boolean} \cr Warning messages will be displayed if set to TRUE.} } \if{html}{\out{
}} diff --git a/man/Model.Rd b/man/Model.Rd index 515ecbd..b768269 100644 --- a/man/Model.Rd +++ b/man/Model.Rd @@ -37,16 +37,16 @@ Constructor of Model class. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{lrner}}{(\code{Lrner(1)}) \cr +\item{\code{lrner}}{\code{Lrner} \cr The learner.} -\item{\code{train_data}}{(\code{TrainData(1)}) \cr +\item{\code{train_data}}{\code{TrainData(1)} \cr Training data.} -\item{\code{base_model}}{(\code{object(1)}) \cr +\item{\code{base_model}}{\code{object} \cr Base model as returned by the original learn function.} -\item{\code{train_layer}}{(\code{TrainLayer(1)}) \cr +\item{\code{train_layer}}{\code{TrainLayer} \cr The current training layer on which the model is stored.} } \if{html}{\out{
}} @@ -167,13 +167,13 @@ Predict target values for the new data \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{testing_data}}{\code{TestData(1)} \cr +\item{\code{testing_data}}{\code{TestData} \cr An object from class \link{TestData}.} -\item{\code{use_var_sel}}{\code{boolean(1)} \cr +\item{\code{use_var_sel}}{\code{boolean} \cr If TRUE, selected variables available at each layer are used.} -\item{\code{ind_subset}}{\code{vector(1)} \cr +\item{\code{ind_subset}}{\code{vector} \cr Subset of individual IDs to be predicted.} \item{\code{...}}{Further parameters to be passed to the basic predict function.} diff --git a/man/PredictData.Rd b/man/PredictData.Rd index 11421c0..17857b4 100644 --- a/man/PredictData.Rd +++ b/man/PredictData.Rd @@ -52,13 +52,13 @@ Initialize a new object from the current class. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr +\item{\code{id}}{\code{character} \cr Object ID.} -\item{\code{ind_col}}{(\code{character(1)})\cr +\item{\code{ind_col}}{\code{character}\cr Column name containing individual IDs.} -\item{\code{data_frame}}{(\code{data.frame(1)})\cr +\item{\code{data_frame}}{\code{data.frame}\cr \code{data.frame} containing data.} } \if{html}{\out{
}} diff --git a/man/PredictLayer.Rd b/man/PredictLayer.Rd index 3538ee9..8f3733d 100644 --- a/man/PredictLayer.Rd +++ b/man/PredictLayer.Rd @@ -51,7 +51,7 @@ constructor \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr +\item{\code{id}}{\code{character} \cr The layer ID.} } \if{html}{\out{
}} @@ -125,7 +125,7 @@ Assigns a predicting object to the predicted layer. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{predicting}}{\code{Predicting(1)} \cr} +\item{\code{predicting}}{\code{Predicting} \cr} } \if{html}{\out{
}} } diff --git a/man/PredictMetaLayer.Rd b/man/PredictMetaLayer.Rd index 72db014..379ae91 100644 --- a/man/PredictMetaLayer.Rd +++ b/man/PredictMetaLayer.Rd @@ -49,9 +49,9 @@ constructor \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)})\cr} +\item{\code{id}}{\code{character}\cr} -\item{\code{predicting}}{(\code{Predicting(1)})\cr} +\item{\code{predicting}}{\code{Predicting}\cr} } \if{html}{\out{
}} } diff --git a/man/Predicting.Rd b/man/Predicting.Rd index a123c94..d6834a6 100644 --- a/man/Predicting.Rd +++ b/man/Predicting.Rd @@ -64,10 +64,10 @@ constructor \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)})\cr +\item{\code{id}}{\code{character}\cr Predicting id.} -\item{\code{ind_col}}{(\code{character(1L)}) +\item{\code{ind_col}}{\code{character} Name of column of individuals IDS} } \if{html}{\out{
}} diff --git a/man/Target.Rd b/man/Target.Rd index 7f201fb..bb267b3 100644 --- a/man/Target.Rd +++ b/man/Target.Rd @@ -53,13 +53,13 @@ Initialize a new object from the current class. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr +\item{\code{id}}{\code{character} \cr The Object ID.} -\item{\code{data_frame}}{(\code{data.frame(1)})\cr +\item{\code{data_frame}}{\code{data.frame}\cr \code{data.frame} containing data.} -\item{\code{training}}{(\code{Training(1)}) \cr +\item{\code{training}}{\code{Training} \cr Training where to store the current object.} } \if{html}{\out{
}} diff --git a/man/TestData.Rd b/man/TestData.Rd index 155534b..625af57 100644 --- a/man/TestData.Rd +++ b/man/TestData.Rd @@ -50,16 +50,16 @@ Initialize a new object from the current class. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr +\item{\code{id}}{\code{character} \cr Object ID.} -\item{\code{data_frame}}{(\code{data.frame(1)})\cr +\item{\code{data_frame}}{\code{data.frame}\cr \code{data.frame} containing data.} -\item{\code{new_layer}}{(\code{TestLayer(1)}) \cr +\item{\code{new_layer}}{\code{TestLayer} \cr Layer where to store the current object.} -\item{\code{ind_col}}{(\code{character(1)})\cr +\item{\code{ind_col}}{\code{character}\cr Column name containing individual IDs.} } \if{html}{\out{
}} diff --git a/man/TestLayer.Rd b/man/TestLayer.Rd index 246e4b5..e72f1f1 100644 --- a/man/TestLayer.Rd +++ b/man/TestLayer.Rd @@ -51,10 +51,10 @@ constructor \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)})\cr +\item{\code{id}}{\code{character}\cr Testing layer id.} -\item{\code{testing}}{(\code{Testing(1)})\cr} +\item{\code{testing}}{\code{Testing}\cr} } \if{html}{\out{
}} } diff --git a/man/TestMetaLayer.Rd b/man/TestMetaLayer.Rd index 4517dfa..89260f1 100644 --- a/man/TestMetaLayer.Rd +++ b/man/TestMetaLayer.Rd @@ -50,10 +50,10 @@ constructor \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)})\cr +\item{\code{id}}{\code{character}\cr Testing meta-layer id.} -\item{\code{testing}}{(\code{Testing(1)})\cr} +\item{\code{testing}}{\code{Testing}\cr} } \if{html}{\out{
}} } diff --git a/man/Testing.Rd b/man/Testing.Rd index 442e8fc..3d414dc 100644 --- a/man/Testing.Rd +++ b/man/Testing.Rd @@ -58,13 +58,13 @@ constructor \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)})\cr +\item{\code{id}}{\code{character}\cr Testing id.} -\item{\code{ind_col}}{(\code{character(1)}) +\item{\code{ind_col}}{\code{character} Name of column of individuals IDS in testing data.frame.} -\item{\code{verbose}}{(\code{boolean}) \cr +\item{\code{verbose}}{\code{boolean} \cr Warning messages will be displayed if set to TRUE.} } \if{html}{\out{
}} diff --git a/man/TrainData.Rd b/man/TrainData.Rd index e7a9097..bd7df85 100644 --- a/man/TrainData.Rd +++ b/man/TrainData.Rd @@ -54,13 +54,13 @@ Initialize a new object from the current class. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr +\item{\code{id}}{\code{character} \cr The Object ID.} -\item{\code{data_frame}}{(\code{data.frame(1)})\cr +\item{\code{data_frame}}{\code{data.frame}\cr \code{data.frame} containing data.} -\item{\code{train_layer}}{(\code{TrainLayer(1)}) \cr +\item{\code{train_layer}}{\code{TrainLayer} \cr Training layer where to store the current object.} } \if{html}{\out{
}} diff --git a/man/TrainLayer.Rd b/man/TrainLayer.Rd index 51dd3cf..4b82895 100644 --- a/man/TrainLayer.Rd +++ b/man/TrainLayer.Rd @@ -73,10 +73,10 @@ constructor \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)})\cr +\item{\code{id}}{\code{character}\cr Training layer id.} -\item{\code{training}}{(\code{Training(1)})\cr} +\item{\code{training}}{\code{Training}\cr} } \if{html}{\out{
}} } @@ -133,13 +133,13 @@ Trains the current layer. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{ind_subset}}{\code{vector(1)} \cr +\item{\code{ind_subset}}{\code{vector} \cr ID subset of individuals to be used for training.} -\item{\code{use_var_sel}}{\code{boolean(1)} \cr +\item{\code{use_var_sel}}{\code{boolean} \cr If TRUE, variable selection is performed before training.} -\item{\code{verbose}}{(\code{boolean}) \cr +\item{\code{verbose}}{\code{boolean} \cr Warning messages will be displayed if set to TRUE.} } \if{html}{\out{
}} @@ -160,10 +160,10 @@ Variable selection on the current layer. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{ind_subset}}{\code{vector(1)} \cr +\item{\code{ind_subset}}{\code{vector} \cr ID subset of individuals to be used for variable selection.} -\item{\code{verbose}}{(\code{boolean}) \cr +\item{\code{verbose}}{\code{boolean} \cr Warning messages will be displayed if set to TRUE.} } \if{html}{\out{
}} @@ -186,7 +186,7 @@ Predicts values for the new layer taking as argument. \describe{ \item{\code{new_layer}}{\code{TrainLayer} \cr} -\item{\code{use_var_sel}}{\code{boolean(1)} \cr +\item{\code{use_var_sel}}{\code{boolean} \cr If TRUE, selected variables available at each layer are used.} \item{\code{ind_subset}}{\code{vector} \cr} diff --git a/man/TrainMetaLayer.Rd b/man/TrainMetaLayer.Rd index 1811fe4..2b4449b 100644 --- a/man/TrainMetaLayer.Rd +++ b/man/TrainMetaLayer.Rd @@ -69,10 +69,10 @@ constructor \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)})\cr +\item{\code{id}}{\code{character}\cr Id of training meta-layer.} -\item{\code{training}}{(\code{Training(1)})\cr} +\item{\code{training}}{\code{Training}\cr} } \if{html}{\out{
}} } @@ -129,10 +129,10 @@ Trains the current layer. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{ind_subset}}{\code{vector(1)} \cr +\item{\code{ind_subset}}{\code{vector} \cr ID subset of individuals to be used for training.} -\item{\code{verbose}}{(\code{boolean}) \cr +\item{\code{verbose}}{\code{boolean} \cr Warning messages will be displayed if set to TRUE.} } \if{html}{\out{
}} @@ -153,9 +153,9 @@ Predicts values for the new layer taking as argument. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{new_layer}}{\code{TrainLayer(1)} \cr} +\item{\code{new_layer}}{\code{TrainLayer} \cr} -\item{\code{ind_subset}}{\code{vector(1)} \cr} +\item{\code{ind_subset}}{\code{vector} \cr} } \if{html}{\out{
}} } @@ -176,12 +176,12 @@ Only mode and median based imputations are actually supported. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{impute_fct}}{\code{character(1)} \cr +\item{\code{impute_fct}}{\code{character} \cr An imputation function to use instead of median or mode imputation. This parameter is actually not used. This corresponds to median or mode based imputation.} -\item{\code{impute_param}}{\code{list(1)} \cr +\item{\code{impute_param}}{\code{list} \cr The list of parameters to call the imputation function. Not yet implemented!} } \if{html}{\out{
}} @@ -274,16 +274,16 @@ meta learner. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{\code{character(1)} \cr +\item{\code{id}}{\code{character} \cr ID of the \link{TrainData} object to be instanciated.} -\item{\code{ind_col}}{\code{character(1)} \cr +\item{\code{ind_col}}{\code{character} \cr Name of individual column IDs.} -\item{\code{data_frame}}{\code{data.frame(1)} \cr +\item{\code{data_frame}}{\code{data.frame} \cr \code{data.frame} of layer specific predictions.} -\item{\code{target}}{\code{character(1)} \cr +\item{\code{target}}{\code{character} \cr Name of the target variable} } \if{html}{\out{
}} diff --git a/man/Training.Rd b/man/Training.Rd index 8e3fd10..85f3294 100644 --- a/man/Training.Rd +++ b/man/Training.Rd @@ -98,21 +98,21 @@ constructor \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr} +\item{\code{id}}{\code{character} \cr} -\item{\code{ind_col}}{(\code{character(1)}) \cr +\item{\code{ind_col}}{\code{character} \cr Name of column of individuals IDS.} -\item{\code{target}}{(\code{character(1)}) \cr +\item{\code{target}}{\code{character} \cr Name of the target variable.} -\item{\code{target_df}}{(\code{data.frame(1)}) \cr +\item{\code{target_df}}{\code{data.frame} \cr Data frame with two columns: individual IDs and response variable values.} -\item{\code{problem_type}}{(\code{character}) \cr +\item{\code{problem_type}}{\code{character} \cr Either "classification" or "regression".} -\item{\code{verbose}}{(\code{boolean}) \cr +\item{\code{verbose}}{\code{boolean} \cr Warning messages will be displayed if set to TRUE.} } \if{html}{\out{
}} @@ -147,10 +147,10 @@ Train each layer of the current Training. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{ind_subset}}{(\code{character(1)})\cr +\item{\code{ind_subset}}{\code{character}\cr Subset of individuals IDs to be used for training.} -\item{\code{use_var_sel}}{\code{boolean(1)} \cr +\item{\code{use_var_sel}}{\code{boolean} \cr If TRUE, selected variables available at each layer are used.} } \if{html}{\out{
}} @@ -171,10 +171,10 @@ Predicts values given new data. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{testing}}{(\code{TestData(1)}) \cr +\item{\code{testing}}{\code{TestData} \cr Object of class \link{TestData}.} -\item{\code{ind_subset}}{(\code{vector(1)}) \cr +\item{\code{ind_subset}}{\code{vector} \cr Subset of individuals IDs to be used for training.} } \if{html}{\out{
}} @@ -200,16 +200,16 @@ Creates a meta training dataset and assigns it to the meta layer. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{resampling_method}}{(\verb{function(1)}) \cr +\item{\code{resampling_method}}{\code{function} \cr Function for internal validation.} -\item{\code{resampling_arg}}{(\code{list(1)}) \cr +\item{\code{resampling_arg}}{\code{list} \cr List of arguments to be passed to the function.} -\item{\code{use_var_sel}}{\code{boolean(1)} \cr +\item{\code{use_var_sel}}{\code{boolean} \cr If TRUE, selected variables available at each layer are used.} -\item{\code{impute}}{(\code{boolean}) \cr +\item{\code{impute}}{\code{boolean} \cr If TRUE, mode or median based imputation is performed on the modality-specific predictions.} } \if{html}{\out{
}} @@ -236,19 +236,19 @@ Trains the current object. All leaners and the meta learner are trained. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{ind_subset}}{(\code{vector(1)}) \cr +\item{\code{ind_subset}}{\code{vector} \cr ID subset to be used for training.} -\item{\code{use_var_sel}}{\code{boolean(1)} \cr +\item{\code{use_var_sel}}{\code{boolean} \cr If TRUE, variable selection is performed before training.} -\item{\code{resampling_method}}{(\verb{function(1)}) \cr +\item{\code{resampling_method}}{\code{function} \cr Function for internal validation. If not specify, the \code{resampling} function from the package \code{caret} is used for a 10-folds cross-validation.} -\item{\code{resampling_arg}}{(\code{list(1)}) \cr +\item{\code{resampling_arg}}{\code{list} \cr List of arguments to be passed to the function.} -\item{\code{seed}}{(\code{integer(1)}) \cr +\item{\code{seed}}{\code{integer} \cr Random seed. Default is NULL, which generates the seed from \code{R}.} } \if{html}{\out{
}} @@ -269,10 +269,10 @@ Compute predictions for a testing object. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{testing}}{(\code{Testing(1)}) \cr +\item{\code{testing}}{\code{Testing} \cr A new testing object to be predicted.} -\item{\code{ind_subset}}{(\code{vector(1)}) \cr +\item{\code{ind_subset}}{\code{vector} \cr Vector of IDs to be predicted.} } \if{html}{\out{
}} @@ -293,10 +293,10 @@ Variable selection on the current training object. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{ind_subset}}{\code{vector(1)} \cr +\item{\code{ind_subset}}{\code{vector} \cr ID subset of individuals to be used for variable selection.} -\item{\code{verbose}}{(\code{boolean}) \cr +\item{\code{verbose}}{\code{boolean} \cr Warning messages will be displayed if set to TRUE.} } \if{html}{\out{
}} @@ -343,7 +343,7 @@ Get a layer of a given ID. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{\code{character(1)} \cr +\item{\code{id}}{\code{character} \cr The ID of the layer to be returned.} } \if{html}{\out{
}} @@ -403,7 +403,7 @@ Remove a layer of a given ID. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{\code{character(1)} \cr +\item{\code{id}}{\code{character} \cr The ID of the layer to be removed.} } \if{html}{\out{
}} @@ -517,7 +517,7 @@ Set imputation action na.action. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{impute}}{\code{character(1)} \cr +\item{\code{impute}}{\code{character} \cr How to handle missing values.} } \if{html}{\out{
}} diff --git a/man/VarSel.Rd b/man/VarSel.Rd index 49cd251..da661d7 100644 --- a/man/VarSel.Rd +++ b/man/VarSel.Rd @@ -44,24 +44,24 @@ Learner ID. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{id}}{(\code{character(1)}) \cr +\item{\code{id}}{\code{character} \cr Package that implements the variable selection function. If NULL, the variable selection function is called from the current environment.} -\item{\code{package}}{(\code{character(1)}) \cr +\item{\code{package}}{\code{character} \cr Variable selection function name. Note: Variable selection functions, except \code{Boruta}, must return a vector of selected variables.} -\item{\code{varsel_fct}}{(\code{character(1)}) \cr +\item{\code{varsel_fct}}{\code{character} \cr Variable selection parameters.} -\item{\code{varsel_param}}{(\code{list(1)}) \cr +\item{\code{varsel_param}}{\code{list} \cr Layer on which the learner is stored.} -\item{\code{train_layer}}{(\code{TrainLayer(1)}) \cr +\item{\code{train_layer}}{\code{TrainLayer} \cr The training layer where to store the learner.} -\item{\code{na_action}}{\code{character(1)}\cr +\item{\code{na_action}}{\code{character} \cr Handling of missing values in meta-data. Set to "na.keep" to keep missing values, "na.rm" to remove individuals with missing values or "na.impute" (only applicable on meta-data) to impute missing values in meta-data. Only median and mode based imputations are actually handled. With the "na.keep" option, ensure that the provided learner can handle missing values. If \code{TRUE}, the individuals with missing predictor values will be removed from the training dataset.} } @@ -122,19 +122,19 @@ function (\code{lrn_fct}) you provided when creating the learner, or in the pred \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{x}}{(\code{string}(1)) \cr +\item{\code{x}}{\code{string} \cr Name of the argument to pass the matrix of independent variables in the original learning function.} -\item{\code{y}}{(\code{string}(1)) \cr +\item{\code{y}}{\code{string} \cr Name of the argument to pass the response variable in the original learning function.} -\item{\code{object}}{(\code{string}(1)) \cr +\item{\code{object}}{\code{string} \cr Name of the argument to pass the model in the original predicting function.} -\item{\code{data}}{\cr +\item{\code{data}}{\code{character} \cr Name of the argument to pass new data in the original predicting function.} -\item{\code{extract_var_fct}}{(\verb{character(1) or function(1)}) \cr +\item{\code{extract_var_fct}}{\code{character} or \code{function} \cr If the variable selection function that is called does not return a vector, then use this argument to specify a (or a name of a) function that can be used to extract vector of selected variables. Default value is NULL, if selected variables are in a vector.} @@ -154,7 +154,7 @@ Tains the current learner (from class \link{Lrner}) on the current training data \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{ind_subset}}{\code{vector(1)} \cr +\item{\code{ind_subset}}{\code{vector} \cr Individual ID subset on which the training will be performed.} } \if{html}{\out{
}} diff --git a/man/fusemlr.Rd b/man/fusemlr.Rd index 2391ccf..2b13016 100644 --- a/man/fusemlr.Rd +++ b/man/fusemlr.Rd @@ -30,7 +30,7 @@ Function for internal validation. If not specify, the \code{resampling} function \item{resampling_arg}{\code{list} \cr List of arguments to be passed to the function.} -\item{seed}{(\code{integer}) \cr +\item{seed}{\code{integer} \cr Random seed used for resampling. Default is NULL, which generates the seed from \code{R}.} } \value{