-1
我訓練GLM模型在我的類屬性「adverse_effects」是含0和1如何找到預測截止點r中
ctrl <- trainControl(method = "cv", number = 5)
model_logreg <- train(adverse_effects ~.,family=binomial(link='logit'),data=trainSplit_logreg, method = "glm", trControl = ctrl)
predictors <- names(trainSplit_logreg)[names(trainSplit_logreg) != 'adverse_effects']
pred_logreg <- predict(model_logreg$finalModel, testSplit_logreg[,predictors])
這一個因素是預測
summary(pred_logreg)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-14.5600 -2.1220 -1.8700 -1.9890 -1.7090 -0.9459
摘要
我如何知道預測的切點?如何將預測結果映射回0和1?
P.S我得到的0.6144