Description Usage Arguments Value References Examples
View source: R/ensemble_prediction.R
predict is a generic function for predictions from the results of stacking ensemble model fitting functions. The function invokes particular methods which is the ensemble model described in the reference.
1 | ensemble_prediction(ensemble_model, predition_data, mutiple_results = FALSE)
|
ensemble_model |
ensemble model which built by ensemble_model() function |
predition_data |
A vector, matrix, list, or data frame containing the predictions (input). |
mutiple_results |
Boolean vector, True for including the single model results. |
Object of numeric class double
Xin Yu et al. 2019 Predicting disease progression in lung adenocarcinoma patients based on methylation correlated blocks using ensemble machine learning classifiers (under review)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(survival)
#import datasets
data(demo_survival_data)
datamatrix<-create_demo()
data(demo_MCBinformation)
#select MCB with at least 3 CpGs.
demo_MCBinformation<-demo_MCBinformation[demo_MCBinformation[,"CpGs_num"]>2,]
trainingset<-colnames(datamatrix) %in% sample(colnames(datamatrix),0.6*length(colnames(datamatrix)))
testingset<-!trainingset
#select one MCB
select_single_one=1
em<-ensemble_model(t(demo_MCBinformation[select_single_one,]),
training_set=datamatrix[,trainingset],
Surv_training=demo_survival_data[trainingset])
em_prediction_results<-ensemble_prediction(ensemble_model = em,
predition_data = datamatrix[,testingset])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.