stabs
stabs copied to clipboard
Keep variable selection results of subsamples and visualize
I added a new option, keep.subsampling = FALSE to stabsel function to keep binary subsample variable selection matrix, so that users can visualize subsampling results. For that, I added a third option to plot function, type="subsamples" which uses pheatmap package to plot a heatmap. Code looks like this:
> stab.lasso <- stabsel(x = bodyfat[, -2], y = bodyfat[,2],
fitfun = lars.lasso, cutoff = 0.75,
PFER = 1, keep.subsampling=T)
> plot(stab.lasso, type='subsamples')
and output is as follows:

Does it make sense to provide a way of visualizing subsample selection results like this?
In general I like the idea as it provides new ways to look at the model and at the stability selection results. Things I don't like that much:
-
[ ] Currently, the documentation of new argument
keep.subsamplingand new optiontype = "subsamples"is missing. -
[ ] The package requires another dependency. Is it possible to realize the plot without pheatmap? If not, please fix:
checking dependencies in R code ... WARNING '::' or ':::' import not declared from: 'pheatmap' 'loadNamespace' or 'requireNamespace' call not declared from: 'pheatmap' -
[ ] The current legend is not really appropriate. Is it possible to provide a binary legend (perhaps also with names "selected" / "not selected") instead?
@gokceneraslan (when) will you be able to have a look at the remaining issues?
I'll have time next week to look into this.