Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dkobak authored Jan 8, 2025
1 parent 9a11999 commit 402fe62
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This repository holds all the code and all the data for the following manuscript

* Kobak D, Bernaerts Y, Weis MA, Scala F, Tolias AS, Berens P (2021), [Sparse reduced-rank regression for exploratory visualisation of paired multivariate data](https://rss.onlinelibrary.wiley.com/doi/10.1111/rssc.12494). *Journal of the Royal Statistical Society: Series C (Applied Statistics),* 70 (4), 980--1000.

BioRxiv link (first version from 2018): https://www.biorxiv.org/content/10.1101/302208v3.article-info
BioRxiv link (first version from 2018): https://www.biorxiv.org/content/10.1101/302208v3

### Note on the usage of glmnet_py
The results in the 2021 paper listed above were derived with the [glmnet_py](https://github.com/bbalasub1/glmnet_python) package. This package currently however causes conflicts with many versions of _scipy_ and seems increasingly difficult for MAC users to work with. We therefore included `sparseRRR_scikit.py` as well as `demo_scikit.ipynb` that runs sparse reduced-rank regression without the need for _glmnet_py_ but uses _scikit-learn_. We believe this will help interested users in deploying sparse reduced-rank regression on their own data without the need for sophisticated environments or complicated dependencies.
<br><br>
Importantly, we adopted the _alpha_ and _l1_ratio_ nomenclature from _scikit-learn_ in that demo, meaning that _alpha_ controls the strength of overall group lasso + ridge regularization and _l1_ratio_ controls how much lasso vs ridge penalty you use (e.g. _l1_ratio_ equal to 1 corresponds to pure group lasso).
### Jan 2025: switching from `glmnet_py` to `scikit_learn`
All analysis in the 2021 paper was done using the sRRR implementation based on the [glmnet_py](https://github.com/bbalasub1/glmnet_python) package. This package can cause conflicts with many versions of `scipy` and gets increasingly difficult to work with. We therefore now provide an equivalent sRRR implementation based on the `MultiTaskElasticNet` class from `scikit-learn`, and recommend this version for all users from now on. Please find it in `sparseRRR_scikit.py` and `demo_scikit.ipynb`.

In this implementation, we adopted the `alpha` and `l1_ratio` nomenclature from `scikit-learn`, meaning that `alpha` controls the strength of the overall group lasso + ridge regularization and `l1_ratio` controls how much lasso vs. ridge penalty is used (`l1_ratio=1` corresponds to pure group lasso).

0 comments on commit 402fe62

Please sign in to comment.