Skip to content

Instantly share code, notes, and snippets.

@bfraiche
Created April 2, 2019 17:41
Show Gist options
  • Save bfraiche/5f4c150393ddf1fe0c1f38b7571f9c89 to your computer and use it in GitHub Desktop.
Save bfraiche/5f4c150393ddf1fe0c1f38b7571f9c89 to your computer and use it in GitHub Desktop.
This gist contains code snippets for my blogpost: 'Random Forest with Python and Spark ML'
from pyspark.ml.tuning import CrossValidator
from pyspark.ml.evaluation import RegressionEvaluator
crossval = CrossValidator(estimator=pipeline,
estimatorParamMaps=paramGrid,
evaluator=RegressionEvaluator(),
numFolds=3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment