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/1c4557619a2545f19df98decc5cbebea to your computer and use it in GitHub Desktop.
Save danared/1c4557619a2545f19df98decc5cbebea to your computer and use it in GitHub Desktop.
val trainedAndValidatedModel = new TrainValidationSplit()
.setEstimator(als)
.setEvaluator(new RegressionEvaluator().setMetricName("rmse").setLabelCol("rating").setPredictionCol("prediction"))
.setEstimatorParamMaps(paramGrid)
.setTrainRatio(0.8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment