I am solving one classification problem using logistic regression algorithm.I am currently trying to find ROC(Reciever Operator Characteristic ) curve to optimize threshold value of the model.
quality=read.csv(“quality.csv”) # load the data
require(“caTools”) # package for splitting
split= sample.split(quality$PoorCare,0.75) # 75% data for training
QualityLog=glm(PoorCare~ OfficeVisits+Narcotics , data=qualitytrain,family=binomial) # model
predicttrain=predict(QualityLog,type=“response”) #predicting on training data