predict.Coxmos {Coxmos} | R Documentation |
predict.Coxmos
Description
Generates the prediction score matrix for Partial Least Squares (PLS) Survival models, facilitating the transformation of high-dimensional data into a reduced space while preserving the most relevant information for survival analysis.
Usage
## S3 method for class 'Coxmos'
predict(object, ..., newdata = NULL)
Arguments
object |
Coxmos model |
... |
additional arguments affecting the predictions produced. |
newdata |
Numeric matrix or data.frame. New data for explanatory variables (raw data). Qualitative variables must be transform into binary variables. |
Details
The predict.Coxmos
function is designed to compute the prediction scores for new data
based on a previously trained PLS Survival model. The function leverages the dimensional reduction
capabilities of PLS to project the new data into a lower-dimensional space, which is particularly
beneficial when dealing with high-dimensional datasets in survival analysis. The score matrix
obtained serves as a compact representation of the original data, capturing the most salient
features that influence survival outcomes.
Value
Score values data.frame for new data using the Coxmos model selected.
Author(s)
Pedro Salguero Garcia. Maintainer: pedsalga@upv.edu.es
Examples
data("X_proteomic")
data("Y_proteomic")
set.seed(123)
index_train <- caret::createDataPartition(Y_proteomic$event, p = .5, list = FALSE, times = 1)
X_train <- X_proteomic[index_train,1:50]
Y_train <- Y_proteomic[index_train,]
X_test <- X_proteomic[-index_train,1:50]
Y_test <- Y_proteomic[-index_train,]
model <- splsicox(X_train, Y_train, n.comp = 2) #after CV
predict(object = model, newdata = X_test)