April 2017
Intermediate to advanced
532 pages
12h 39m
English
Gradient boosted trees are ensembles of decision trees. Gradient boosted trees iteratively train decision trees to minimize the loss function. Gradient boosted trees handle categorical features, support multiclass, and don't require feature scaling.
Spark ML implements gradient boosted trees using the existing decision tree implementation. It supports both classification and regression.
Let's train the bike sharing dataset by splitting it into 80% training and 20% testing, use GBTRegressor with regression evaluator from Spark to build the model, and get evaluation metrics around the test data.
@transient lazy val logger = Logger.getLogger(getClass.getName) def gbtRegressionWithVectorFormat(vectorAssembler: ...
Read now
Unlock full access