This recipe is similar to the GBT classification problem, but we will use regression instead. We will use BoostingStrategy.defaultParams() to direct the GBT to use regression:
algo = "Regression"
val boostingStrategy = BoostingStrategy.defaultParams(algo)