os.sort {OmicSense}R Documentation

Sort and select predictors according to the strength of target-predictor relationship

Description

Sort and select predictors according to the strength of target-predictor relationship

Usage

os.sort(x, y, method = "linear", n.pred = ncol(x), thresh = 1)

Arguments

x

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

y

A vector of target value.

method

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

n.pred

The number of predictors to be leaved in prediction model (default: ncol(x)).

thresh

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

Value

A data matrix (raw: samples, col: sorted predictors)

Author(s)

Takahiko Koizumi

Examples

data(Pinus)
train <- os.clean(Pinus$train)
target <- Pinus$target
cor(target, train[, 1])

train <- os.sort(train, target, thresh = 0.5)
cor(target, train[, 1])

[Package OmicSense version 0.2.0 Index]