class_model_train: Generate the BGC class models.

View source: R/bgc_class_model.R

class_model_trainR Documentation

Generate the BGC class models.

Description

Generate the BGC class models.

Usage

class_model_train(y, x, binary_method, regression_method, seed = 123)

Arguments

y

a numeric vector. This is the response variables (i.e. class abundances).

x

a matrix of data frame. These are the predictor variables (i.e. domain abundances).

binary_method

method used in the binary classification. Complete match to "rf", "svm" or "xgb" (random forest, support vector machine, and extreme gradient boost, respectively).

regression_method

method used in the regression. Complete match to "lm", "rf", "svm" or "xgb" (linear model, random forest, support vector machine and extreme gradient boost, respectively).

seed

a number. Seed used to compute the random forest and support vector machine, if these are selected as binary or regression methods.

Value

A list containting the call and the binary and regression models.

Examples

class_model_train(
y = t1pks_class_abund,
x = dom_abund,
binary_method = "rf",
regression_method = "lm",
seed = 123)

pereiramemo/bgcpred documentation built on Dec. 14, 2022, 11:45 p.m.