-
Notifications
You must be signed in to change notification settings - Fork 104
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
Feature Request: Boosted Conditional Logit #17
Comments
Boosted conditional logit is definitely close to the intended purpose of this package. I don't have bandwidth to take this on at the moment, but I'm happy to help out on a PR if you take an initial shot at implementing it. |
Hi Timothy, from your expert opinion do you think this can be done using the new Cox PH survival:cox objective function? I know clogit is a special case of cox ph, but I need to understand the setup of the strata fully. |
Hey @csaiedu, I haven't looked at the new Cox PH survavl:cox objective function. It's possible that it could be used. My gut feeling is that an implementation based on https://github.com/dswah/pyGAM might be the fastest way to get boosted conditional logit working in pylogit. Note, my opinion is based on the fact that (1) the original paper by Shi and Yin bases their implementation on smoothing splines and (2)pyGAM looks like its the best developed implementation for using smoothing splines in generalized linear models (which includes most models in PyLogit). |
Thank you Timothy I appreciate the feedback. I'll dig into this. |
I've actually taken a stab at this and implemented it in python using a pylogit. Unfortunately, I couldn't find a smoothing spline implementation in python which could reproduce the results from the paper. So, I call R's smooth.spline object. I can take a look at pyGAM and if I can use that in stead, I'll submit a PR |
@seandickert that would be incredible if you could get a python implementation working. How did attempting to use pyGAM go? Also, did you succeed in reproducing the paper's results using R's smooth.spline object? Am I correct to assume you were using something like r2py to combine pylogit and R? |
Haven't tried with pyGAM yet, but plan to within the next week or so. Correct, I used r2py. This was about a year ago, so I can't recall if I used the dataset that the paper did or my own. However, I trained 2 models: one using just the authors' R package and one using my own implementation that was primarily python with just the calls to smooth.spline in R. The final likelihood and coefficients were the same for each. |
Hi Timothy. A version of conditional logit with xgboost has emerged. In case you missed it: https://discuss.xgboost.ai/t/support-for-left-truncated-data-time-dependent-covariates-for-cox-regression/651 |
Not sure if this branches too far from the intended purpose of the package, but boosted conditional logit models as described in "Shi, H., Yin, G., Boosting conditional logit model". R package located here: https://github.com/cran/clogitboost
The text was updated successfully, but these errors were encountered: