-
Notifications
You must be signed in to change notification settings - Fork 837
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
custom objective function for pyspark #1171
Comments
We are using lightGBM on pyspark to build ML pipeline as well. Wondering if custom loss function is spported for pyspark? |
@kiminsigne @EthanRock yes pyspark support for custom objective function is one of the top things I am looking into adding. We just recently added custom objective function in the scala API in May of this year (#1054). However, pyspark is more complicated because I have to run it on each of the worker nodes, I only know that UDF transformations can do this, so I might have to look into how to communicate with the python processes in workers to understand how to make this work. |
+1 on this. Native LightGBM has |
@andrew-arkhipov it is supported in the scala API, see param here: It's not yet supported in pyspark because there is no easy way to call the python process from scala worker for an arbitrary function like this. I think I have to look into the interprocess communication code from apache spark to figure out how to enable this scenario. |
Thank you @imatiach-msft for answering this |
Hi there! |
Any update on PySpark implementation? |
Is there a way to use custom objective function in pyspark already implemented?
I understand that an error occurred when converting python object to the FObjTrait type. If there is a way to use your own objective function in pyspark, thank you for giving me a specific example |
is there any progress on this? I fail to find any documentation on the subject |
Hi, I can see that the custom objective function for the Scala API was recently added in this PR, which is really exciting! Is there any idea when this functionally will be added in pyspark (perhaps it has and I haven't found the PR yet)?
I'm very interested in implementing a custom objective function for the LightGBMRanker model using mean average precision (trying to follow the approach in this paper) which is suited for binary relevance, as the current 'lambdarank' function uses NDCG which is best suited for graded relevance measure. It would be nice to have this feature as the xgboost python package has the option to use the
rank:map
objective in addition to the defaultrank:ndcg
.Thanks so much! We've been using your model at our company for the past year, but our training data is binary not graded, and I'd love to use something better suited to our data!
The text was updated successfully, but these errors were encountered: