June 2017
Beginner to intermediate
576 pages
15h 22m
English
SparkR does have a prediction method, aptly named predict(), so we can run predictions on the training set:
#look at the predictions vs. the training dataset preds_train <- predict(model, df) preds_train$grp <- 1 preds_train$totrows = nrow(preds_train)
The prediction variable is the probability that the outcome of the event (diabetes) will occur:
head(preds_train)