# NOT RUN {
# Tune models using only the first 40 rows to keep computation fast
models <- machine_learn(pima_diabetes[1:40, ], patient_id,
outcome = diabetes, tune = FALSE)
# Make prediction on the next 10 rows. This uses the best-performing model from
# tuning cross validation, and it also prepares the new data in the same way as
# the training data was prepared.
predictions <- predict(models, newdata = pima_diabetes[41:50, ])
predictions
evaluate(predictions)
plot(predictions)
# }
Run the code above in your browser using DataLab