Predict Functions in R

The following is a list of predict functions of predictive modeling techniques in R.

Support Vector Machine [library(e1071)]
svm.pred = predict(svm.mod, val, probability = TRUE)
Random Forest [library(randomForest)] / CART [library(rpart)]
rf.pred = predict(rf.mod,val, type="prob")

Logistic Regression [library(car)]
log.pred = predict(log.mod,val, type="response")
Conditional Inference Tree / Forest [library(party)]
ct.pred = predict(ct.mod,val)
Gradient Boosting Tree [library(gbm)]
gbm.pred = predict(gbm.mod, type = "response", n.trees)
In Caret Package, there is only one predict function i.e.  predict(log.mod,val, type="prob")
Spread the Word!
Related Posts
About Author:

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has over 10 years of experience in data science. During his tenure, he has worked with global clients in various domains like Banking, Insurance, Private Equity, Telecom and Human Resource.

0 Response to "Predict Functions in R"

Post a Comment

Next → ← Prev