Type parameter of the predict() function

后端 未结 3 1576
青春惊慌失措
青春惊慌失措 2021-02-05 08:29

What is the difference between type=\"class\" and type=\"response\" in the predict function?

For instance between:



        
3条回答
  •  忘掉有多难
    2021-02-05 08:57

    type = "response" is used in glm models and type = "class" is used in rpart models(CART). See:

    • predict.glm
    • predict.rpart

提交回复
热议问题