Skip to content
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

coefficients from each run #28

Open
richabatra opened this issue Jun 16, 2018 · 3 comments
Open

coefficients from each run #28

richabatra opened this issue Jun 16, 2018 · 3 comments

Comments

@richabatra
Copy link

Is it possible to fetch the coefficients of the variables from each run? It is great to know the stable associations and would be even better to know the direction and degree of relationship between response and variables.

@hofnerb
Copy link
Owner

hofnerb commented Jun 18, 2018

Not directly, no.

But you could write a modified fitfun (see https://github.com/hofnerb/stabs/blob/master/R/fitfuns.R) that returns the coefficients in addition to selected and path (or if that doesn't work, I didn't think deep enough about that issue, instead of one of the slots). Returning it additionally might need a few changes in the stabsel (and/or run_stabsel, see https://github.com/hofnerb/stabs/blob/master/R/stabsel.R#L273) function to allow forwarding/aggregating the relevant slot. You could provide a patch for this!

Alternatively, you can write your own resampling function to obtain the relevant output and simply use the function stabsel_parameters to obtain the relevant parameter constalation for q, cutoff and PFER for the given data set and additional assumptions.

@richabatra
Copy link
Author

alright, I try. Thanks for the input.

@richabatra
Copy link
Author

richabatra commented Jun 22, 2018

your pointers were great! For starters, I extended it for glmnet.lasso, such that it can return a matrix, n (=features) by p (=mean, sd, range of the coefficients) for each lambda.
would you say this is a valid approach? do you have other suggestions, I am happy to learn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants