I\'m trying to tune the hyper-parameters of a Spark (PySpark) ALS
model by TrainValidationSplit
.
It works well, but I want to know which co
You can access best model using bestModel property of the TrainValidationSplitModel:
best_model = model.bestModel
Rank can be accessed directly using rank property of the ALSModel:
best_model.rank
10
Getting maximum number of iterations requires a bit more trickery:
(best_model
._java_obj # Get Java object
.parent() # Get parent (ALS estimator)
.getMaxIter()) # Get maxIter
10