Chapter 5 ๐ค Prediction Model Construction
5.1 Build Model
โYou can use function build_Model to build machine learning predictive model including naive Bayes models, Support vector machine model, random forest model, Cancerclass model, Adaboost model, Logitboost model, Logistics regression model. โThe function returns a trained model.
<- list(MEL_GSE91061, MEL_phs000452, RCC_Braun_2020)
train_set <- build_Model(Model='NB', SE=train_set, feature_genes=Stem.Sig, response_NR = TRUE) mymodel
5.2 Test Model
โtest_Model are designed for testing model built by build_Model function. This function returns a ROC object.
test_Model(mymodel,MEL_GSE78220)
## Setting levels: control = N, case = R
## Setting direction: controls > cases
## [[1]]
##
## Call:
## roc.default(response = data[[2]]$response_NR, predictor = value[, 1]/value[, 2])
##
## Data: value[, 1]/value[, 2] in 12 controls (data[[2]]$response_NR N) > 15 cases (data[[2]]$response_NR R).
## Area under the curve: 0.5722
##
## [[2]]
##
## [[3]]
## [1] "R" "R" "R" "R" "R" "R" "R" "R" "R" "R" "R" "R" "R" "R" "R" "R" "R" "R" "R"
## [20] "R" "R" "R" "R" "R" "R" "R" "R"