impute_rf: Impute missing values using random forest

View source: R/transformations.R

impute_rfR Documentation

Impute missing values using random forest

Description

Impute the missing values in the exprs part of the object using a random forest. The estimated error in the imputation is logged. It is recommended to set the seed number for reproducibility (it is called random forest for a reason). This a wrapper around missForest::missForest. Use parallelize = "variables" to run in parallel for faster testing. NOTE: running in parallel prevents user from setting a seed number. CITATION: When using this function, cite the missForest package

Usage

impute_rf(object, all_features = FALSE, ...)

Arguments

object

a MetaboSet object

all_features

logical, should all features be used? If FALSE (the default), flagged features are removed before imputation.

...

passed to MissForest function

Value

MetaboSet object as the one supplied, with missing values imputed.

See Also

missForest for detail about the algorithm and the parameters

Examples

missing <- mark_nas(example_set, 0)
set.seed(38)
imputed <- impute_rf(missing)


antonvsdata/notame documentation built on Sept. 14, 2024, 11:09 p.m.