[Spark-3525] Adding gradient boosting

First import  SparkConetxt, then you can use 
input.map(l => l.label).mean()
directly