Solving Regression problems with Decision Trees in Spark 2.0

Similar to the previous recipe, we will use the DecisionTree() class to train and predict an outcome using a regression tree model. To refresh all these models is a variation on CART (Classification and Regression Tree), which comes in two modes. In this recipe, we explore the regression API for the decision tree implementation in Spark.

Get Apache Spark 2.x Machine Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.