os.pred | R Documentation |
Construct and apply the OmicSense model with your own data
os.pred(x, y, newx = x, method = "linear", thresh = 0, n.pred = 0)
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). |
A vector of the environment in which the samples of newx were collected
Takahiko Koizumi
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.