Re: PySpark ML: Get best set of parameters from TrainValidationSplit

2018-04-16 Thread Bryan Cutler
Hi Aakash, First you will want to get the the random forest model stage from the best pipeline model result, for example if RF is the first stage: rfModel = model.bestModel.stages[0] Then you can check the values of the params you tuned like this: rfModel.getNumTrees On Mon, Apr 16, 2018 at 7:

PySpark ML: Get best set of parameters from TrainValidationSplit

2018-04-16 Thread Aakash Basu
Hi, I am running a Random Forest model on a dataset using hyper parameter tuning with Spark's paramGrid and Train Validation Split. Can anyone tell me how to get the best set for all the four parameters? I used: model.bestModel() model.metrics() But none of them seem to work. Below is the c