# NOT RUN {
library(kernlab)
pos_Q1 <- PredCRG_data$pos_Q1
neg_Q1 <- PredCRG_data$neg_Q1
#training of the model using laplace kernel.
user_model <- PredCRG_training(pos_seq=pos_Q1[1:100], neg_seq=neg_Q1[1:100], kern="laplace")
data(test)
tst_enc <- PredCRG_Enc(test[1:10])#encoding of the test set
predict(user_model, tst_enc, type="response") #predicting the label of the test instances
predict(user_model, tst_enc, type="probabilities")#predicting the probability of the test instances
library(e1071)
#training of the model using RBF kernel.
user_model <- PredCRG_training(pos_seq=pos_Q1[1:100], neg_seq=neg_Q1[1:100], kern="RBF")
predict(user_model, tst_enc, probability=TRUE) #Predicting probability
predict(user_model, tst_enc) #Predicting labels
# }
Run the code above in your browser using DataLab