fit_rf: Fit Random Forest

Description Usage Arguments Value See Also Examples

View source: R/multivariate.R

Description

Fits a random forest, where given response column in pheno data is predicted using the features. Can be used both for classification and regression. For more information, see the documentation of randomForest::randomForest. After fitting the random forest, use rf_importance as a shortcut for getting the feature importance in random forest prediction.

Usage

1
fit_rf(object, response, all_features = FALSE, importance = TRUE, ...)

Arguments

object

a MetaboSet object

response

character, column name of phenoData giving response

all_features

should all features be included in the model? if FALSE, flagged features are left out

importance

Should importance of features be assessed?

...

other parameters passed to randomForest::randomForest

Value

An object of class randomForest

See Also

randomForest, rf_importance

Examples

1
2
3
rf <- fit_rf(example_set, response = "Group")
rf
importance_rf(rf)

antonvsdata/amp documentation built on Jan. 8, 2020, 3:15 a.m.