Re: how to see Pipeline model information

2016-11-27 Thread Zhiliang Zhu
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 

Re: how to see Pipeline model information

2016-11-24 Thread Xiaomeng Wan
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]

Re: how to see Pipeline model information

2016-11-24 Thread Zhiliang Zhu
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()     

Re: how to see Pipeline model information

2016-11-23 Thread Xiaomeng Wan
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

how to see Pipeline model information

2016-11-23 Thread Zhiliang Zhu
Dear All, I am building model by spark pipeline, and in the pipeline I used Random Forest Alg as its stage. If I just use Random Forest but not make it by way of pipeline, I could see the information about the forest by API as rfModel.toDebugString() and rfModel.toString() . However, while it