Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGraph trials #13
Graph trials #13
Conversation
|
Hi, that looks nice so far. Some questions / remarks:
Otherwise your proposed changes look quite reasonable, though I did not check the functionality of the fitfun yet. Please also add short, quick running tests that checks your novel code. You can use testthat if you like, though I didn't make this move for the existing tests yet. Thx. |
… outcome argument. Updated the vignette to match.
| @@ -13,7 +13,7 @@ export(stabsel, stabsel.matrix, stabsel.data.frame, stabsel.stabsel, | |||
| selected, selected.stabsel, | |||
| plot.stabsel, print.stabsel, print.stabsel_parameters, | |||
| glmnet.lasso, glmnet.lasso_maxCoef, lars.lasso, lars.stepwise, | |||
| subsample) | |||
| subsample, stabs.quic, getLamPath) | |||
hofnerb
Sep 21, 2016
Owner
please use standard naming convention, i.e., package name followed by type of model, e.g., quic.graphical_model and do not export getLamPath (I do not see that the user needs that.
please use standard naming convention, i.e., package name followed by type of model, e.g., quic.graphical_model and do not export getLamPath (I do not see that the user needs that.
| @@ -20,6 +20,15 @@ stabsel.matrix <- function(x, y, fitfun = lars.lasso, args.fitfun = list(), | |||
|
|
|||
| cll <- match.call() | |||
| p <- ncol(x) ## TODO: what about intercept? | |||
| if (missing(y)) { | |||
hofnerb
Sep 21, 2016
Owner
Please do not base this ONLY on a missing y but also on the class of your fitter
Please do not base this ONLY on a missing y but also on the class of your fitter
| ## Must be a graphical model | ||
| y <- x | ||
| p <- p * (p-1)/2 | ||
| graphical <- TRUE |
hofnerb
Sep 21, 2016
Owner
Why do you need the option graphical?
Why do you need the option graphical?
hofnerb
Sep 21, 2016
Owner
btw. this won't work as you never set this to FALSE in the other cases...
btw. this won't work as you never set this to FALSE in the other cases...
| graphical <- TRUE | ||
| if (verbose) { | ||
| message("No y (outcome) provided - assuming graphical model") | ||
| } |
hofnerb
Sep 21, 2016
Owner
Remove this message after the changes indicated above
Remove this message after the changes indicated above
| @@ -49,11 +58,15 @@ stabsel.matrix <- function(x, y, fitfun = lars.lasso, args.fitfun = list(), | |||
| } | |||
|
|
|||
| nms <- colnames(x) | |||
| if (graphical) { | |||
hofnerb
Sep 21, 2016
Owner
please add a check based on the class of the fitter as above.
please add a check based on the class of the fitter as above.
| @@ -0,0 +1,67 @@ | |||
| #' Create a regularization path - copied from pulsar. | |||
hofnerb
Sep 21, 2016
Owner
In general I very much appreciate using roxygen, yet, it is not used in this package so far. Thus I would kindly ask you to remove roxygen and use standard Rd files instead.
In general I very much appreciate using roxygen, yet, it is not used in this package so far. Thus I would kindly ask you to remove roxygen and use standard Rd files instead.
richardbeare
Sep 21, 2016
Author
Contributor
You can just leave the roxygen markup in place and never run roxygen. I've committed the documentation files that were created so you can ignore it for now, assuming that you intend to go that direction in the future.
You can just leave the roxygen markup in place and never run roxygen. I've committed the documentation files that were created so you can ignore it for now, assuming that you intend to go that direction in the future.
hofnerb
Sep 21, 2016
Owner
True.
True.
| }) | ||
|
|
||
| ## Not sure if it is better to have more or less than q | ||
| lamidx <- which.max(qvals >= q) |
hofnerb
Sep 21, 2016
Owner
can it happen that you do not get equality?
can it happen that you do not get equality?
| Depends: R (>= 2.14.0), methods, stats, parallel | ||
| Imports: graphics, grDevices, utils | ||
| Suggests: TH.data, hdi | ||
| Suggests: TH.data, hdi, knitr, QUIC, igraph, testthat |
hofnerb
Sep 21, 2016
Owner
please add QUIC to Enhances
please add QUIC to Enhances
|
I've never used the review feature so far. I hope it helps to get things done more easily. Contact me via email if necessary :) |
|
I've not found the review interface great for discussion, but see how we go. I've obviously messed up not initialising graphical - too rushed. I'm not seeing where you set classes for fitter functions - will this be a new feature or do you already use it somewhere. Appreciate your feedback on this! |
|
As I cannot push directly to the pull request please find attached two files which implement the class-based solution I was thinking of. |
|
OK, got it. PS - not sure this actually changes ease of use etc, over either an Factors to consider - is there ever a non graphical case with missing y? If User supplied graphical function wrappers will need to set class - can be Anyhow - will do it this way and see how it goes. On Wed, Sep 21, 2016 at 9:38 PM, Benjamin Hofner notifications@github.com
|
|
Well, I do not want to clutter the interface with an argument hardly ever needed. We could also check the function names, yet, this would not allow user specified functions at all. Only checking the missing y is somewhat error prone (and we do not know yet if someone else might have similar problems as well). I would not solely rely on that. So using the class of the function is no burden for a standard user (who uses simply the implemented functions) and little burden for someone wanting to implement new functions for graphical models. If you have a better idea please feel free to go ahead. You could also provide a new interface similar to that of Just one more idea: We could check if |
Hi,
Here's some changes that I hope support using stabs with a sparse inverse covariance solver. The main thing I changed inside stabs was the way p was computed, if a "graphical=TRUE" flag is set.
I'm interested to see whether you think this is the right track.
I've provided a little vignette which includes my wrapper function for QUIC. Try it out using:
devtools::install_github("richardbeare/stabs", ref="GraphTrialsA", build_vignettes=TRUE)
vignette("stabs_graphs")
The vignette needs QUIC, huge, knitr