Skip to content

Instantly share code, notes, and snippets.

@danared
Created June 24, 2016 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danared/41c6b36b963e586af705ba73efe003f0 to your computer and use it in GitHub Desktop.
Save danared/41c6b36b963e586af705ba73efe003f0 to your computer and use it in GitHub Desktop.
// We use a ParamGridBuilder to construct a grid of parameters to search over.
// TrainValidationSplit will try all combinations of values and determine best model using the ALS evaluator.
val paramGrid = new ParamGridBuilder()
.addGrid(als.regParam, Array(0.1, 10.0))
.addGrid(als.rank, Array(8, 10))
.addGrid(als.maxIter, Array(10, 20))
.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment