os.pred {OmicSense}R Documentation

Construct and apply the OmicSense model with your own data

Description

Construct and apply the OmicSense model with your own data

Usage

os.pred(x, y, newx = x, method = "linear", thresh = 0, n.pred = 0)

Arguments

x

A data matrix (row: samples, col: predictors).

y

A vector of target value.

newx

A data matrix (row: samples, col: predictors).

method

A string to specify the regression function for calculating R-squared values. "linear" (default), "quadratic" or "cubic" function can be specified.

thresh

The lower threshold of R-squared value to be leaved in prediction model (default: 0).

n.pred

The number of candidate predictors to be leaved in prediction model (default: 30).

Value

A vector of the environment in which the samples of newx were collected

Author(s)

Takahiko Koizumi

Examples

data(Pinus)
train <- os.clean(Pinus$train)
test <- Pinus$test
test <- test[, colnames(train)]
target <- Pinus$target
cor(target, os.pred(train, target, newx = test, method = "cubic"))

[Package OmicSense version 0.2.0 Index]