-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-20498][PYSPARK][ML] Expose getMaxDepth for ensemble tree model in PySpark #18120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@keypointt Hi, could you help check whether the pr is consistent with your #17207 ? Thanks. |
Can one of the admins verify this patch? |
Hi Facai, you exposed api I'd suggest you put the tests in test module and run them to verify |
Hi, @keypointt . It's the feature of Python. The doctest is both document and unit test. |
Oh sorry i missed it, thanks for the heads up.
…On Sat, May 27, 2017 at 2:16 PM Yan Facai (颜发才) ***@***.***> wrote:
Hi, @keypointt <https://github.com/keypointt> . It's the feature of
Python. The doctest is both document and unit test.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18120 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADvmieVs45e2uCq-g3NV2ViMyc8AbiDEks5r-JJ4gaJpZM4NnVv4>
.
|
cc @BryanCutler. Bryan did some work on #17849. It seems even with that patch, we still need to add methods like these, hoping Bryan can confirm. If we're going to add some param accessors to the models, best to do them all at once yes? E.g. we can also add |
Thanks @facaiy for the PR. This might be enough to simply retrieve the value from the Java model, but I think the Python model also needs to "own" the param. For example, if we have a
This is because the Python object does not have an instance of the param, its only getting a value from the Java model. Additionally, many of the methods you would expect to work from class
As @sethah pointed out #17849 has the fix so that the Python models would have an instance of each param, so that should go in first. Then, the accessor could be written like this:
I'm not sure what the best approach for adding these accessors, all at once or one by one as needed, like with cc @holdenk @jkbradley for your input |
Thanks, @BryanCutler. If only model could inherit both params and its getter method, perhaps it will be better in my opinion. Anyway, it is OK whether the pr will be merged or not, as it is trivial. |
What changes were proposed in this pull request?
add
getMaxDepth
method for ensemble tree models:RandomForestClassifierModel
RandomForestRegressionModel
GBTClassificationModel
GBTRegressionModel
How was this patch tested?