aboutsummaryrefslogtreecommitdiff
path: root/examples/src/main/python/ml/random_forest_classifier_example.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/src/main/python/ml/random_forest_classifier_example.py')
-rw-r--r--examples/src/main/python/ml/random_forest_classifier_example.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/src/main/python/ml/random_forest_classifier_example.py b/examples/src/main/python/ml/random_forest_classifier_example.py
index a7fc765318..eb9ded9af5 100644
--- a/examples/src/main/python/ml/random_forest_classifier_example.py
+++ b/examples/src/main/python/ml/random_forest_classifier_example.py
@@ -50,7 +50,7 @@ if __name__ == "__main__":
(trainingData, testData) = data.randomSplit([0.7, 0.3])
# Train a RandomForest model.
- rf = RandomForestClassifier(labelCol="indexedLabel", featuresCol="indexedFeatures")
+ rf = RandomForestClassifier(labelCol="indexedLabel", featuresCol="indexedFeatures", numTrees=10)
# Chain indexers and forest in a Pipeline
pipeline = Pipeline(stages=[labelIndexer, featureIndexer, rf])