# NOT RUN {
library(kernlab)
data(test)
nam <- names(test)
#encoding of test set using compositional, transitional and physico-chemical features
enc <- PredCRG_Enc(test)
#predicting test set using model4 as CRG or non-CRG
pred <- predict(model4, newdata=enc[1:10,], type="response")
#predicting probabilities of the test sequences using model4
pred1 <- predict(model4, newdata=enc[1:10,], type="probabilities")
#combining predicted labels and probabilities
result <- data.frame(seq_name=nam[1:10], predicted_label=as.character(pred)
,predicted_probability=pred1[,"CRG"])
print(result)
# }
Run the code above in your browser using DataLab