Get startedGet started for free

Machine learning functions

In the last chapter, you saw some of the feature transformation functionality of Spark MLlib. If that library were a meal, the feature transformations would be a starter; the main course is a sumptuous selection of machine learning modeling functions! These functions all have names beginning with ml_, and have a similar signature. They take several arguments, including a tibble, a formula specifying the relationship between variables, a string naming the features, a string containing the labels and more.

Supported machine learning functions include linear regression and its variants, tree-based models (ml_decision_tree_classifier()), and a few others. You can see the list of all the machine learning functions using ls().

ls("package:sparklyr", pattern = "^ml")

What arguments do all the machine learning model functions take?

This exercise is part of the course

Introduction to Spark with sparklyr in R

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise