I have worked it out, just let java call scala class function .Thank Xiaomeng a
lot~~
On Friday, November 25, 2016 1:50 AM, Xiaomeng Wan
wrote:
here is the scala code I use to get the best model, I never used java
val cv = new
here is the scala code I use to get the best model, I never used java
val cv = new CrossValidator().setEstimator(pipeline).setEvaluator(new
RegressionEvaluator).setEstimatorParamMaps(paramGrid)
val cvModel = cv.fit(data)
val plmodel = cvModel.bestModel.asInstanceOf[PipelineModel]
Hi Xiaomeng,
Thanks very much for your comment, which is helpful for me.
However, it seems that here met more issue about XXXClassifier and
XXXClassificationModel,as the codes below:
... GBTClassifier gbtModel = new GBTClassifier(); ParamMap[]
grid = new ParamGridBuilder()
You can use pipelinemodel.stages(0).asInstanceOf[RandomForestModel]. The
number (0 in example) for stages depends on the order you call setStages.
Shawn
On 23 November 2016 at 10:21, Zhiliang Zhu
wrote:
>
> Dear All,
>
> I am building model by spark pipeline, and