[
https://issues.apache.org/jira/browse/SPARK-19282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15831444#comment-15831444
]
Nick Lothian commented on SPARK-19282:
--------------------------------------
Yes. There are basically two parameters that are tuned in RandomForests: the
number of trees and the max depth.
The example in the docs shows this:
{{rf = RandomForestRegressor(numTrees=2, maxDepth=2, seed=42)}}
http://spark.apache.org/docs/latest/api/python/pyspark.ml.html#pyspark.ml.regression.RandomForestRegressor
During parameter tuning it is common to try many, many combinations of these
parameters which can take reasonable amount of time (I've had parameter turning
run for over 12 hours before). It's pretty annoying if one can't easily find
what the best parameters found are!
> RandomForestRegressionModel should expose getMaxDepth
> -----------------------------------------------------
>
> Key: SPARK-19282
> URL: https://issues.apache.org/jira/browse/SPARK-19282
> Project: Spark
> Issue Type: Improvement
> Components: ML
> Affects Versions: 2.1.0
> Reporter: Nick Lothian
> Priority: Minor
>
> Currently it isn't clear hot to get the max depth of a
> RandomForestRegressionModel (eg, after doing a grid search)
> It is possible to call
> {{regressor._java_obj.getMaxDepth()}}
> but most other decision trees allow
> {{regressor.getMaxDepth()}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]