Github user holdenk commented on a diff in the pull request:
https://github.com/apache/spark/pull/7432#discussion_r35788742
--- Diff: python/pyspark/ml/classification.py ---
@@ -299,9 +299,9 @@ class RandomForestClassifier(JavaEstimator,
HasFeaturesCol, HasLabelCol, HasPred
>>> stringIndexer = StringIndexer(inputCol="label",
outputCol="indexed")
>>> si_model = stringIndexer.fit(df)
>>> td = si_model.transform(df)
- >>> rf = RandomForestClassifier(numTrees=2, maxDepth=2,
labelCol="indexed", seed=42)
+ >>> rf = RandomForestClassifier(numTrees=3, maxDepth=2,
labelCol="indexed", seed=42)
--- End diff --
As mentioned in the git commit, it's actually tied at 2 tries so the change
in how we selected it changed the prediction (since when its tied one would
grab the first and the other the last), so I switched it to three trees so it
wouldn't be tied and the test would be testing what we were looking for. I'll
make a JIRA to update the Python API after my morning standup :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]