View source: R/PrognosticModel.R
PrognosticModel | R Documentation |
Prognostic Model construction
PrognosticModel(
x,
y,
scale = FALSE,
seed = 123456,
train_ratio = 0.7,
nfold = 10,
plot = T
)
x |
input matrix or data.frame where samples are in rows and features in columns; The first column of x is the sample ID of which column is "ID". |
y |
input matrix or data.frame with three column. Column names are "ID", "time", "status" |
scale |
A logistic: should the x be scaled, default is TRUE. |
seed |
default 123456 |
train_ratio |
Value between 0-1; The ratio was used to split the x and y into training and testing data. |
nfold |
nfold default 10 |
plot |
A logistic, default is TRUE. |
a list contain the results of 2 model (Lasso, Ridge) and the input train data.
data("imvigor210_sig", package = "IOBR")
data("imvigor210_pdata",package = "IOBR")
pdata_prog <- imvigor210_pdata %>% dplyr::select(ID, OS_days, OS_status) %>% mutate(OS_days = as.numeric(.$OS_days)) %>% mutate(OS_status = as.numeric(.$OS_status))
prognostic_result <- PrognosticModel(x = imvigor210_sig, y = pdata_prog, scale = T, seed = 123456, train_ratio = 0.7, nfold = 10, plot = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.