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

Immediate crash on small problem #22

Closed
GabeAl opened this issue Jun 27, 2019 · 1 comment
Closed

Immediate crash on small problem #22

GabeAl opened this issue Jun 27, 2019 · 1 comment

Comments

@GabeAl
Copy link

GabeAl commented Jun 27, 2019

R MRO v3.5.3 and RStudio 1.2.1335 (both fresh installs), latest biglasso. Windows 10 (1903).

Biglasso works on the "colon" toy example with exact same script as below (except X and y are pulled out of the colon data object).

But, biglasso fails with a complete R crash (RStudio reports fatal error) with this:
minimal.gz
Contains a tiny matrix and outcome vector, X and y.

library(biglasso)
load('F:/minimal.gz')
X.bm <- as.big.matrix(X)
fit.bin.lasso <- biglasso(X.bm, y, family = "binomial")

Yet it works perfectly with glmnet:
fit.bin.lasso.glmnet <- glmnet(X, y, family = "binomial")

> str(X)
 int [1:242, 1:2000] 1 1 1 1 1 1 1 1 1 1 ...
 - attr(*, "dimnames")=List of 2
  ..$ : NULL
  ..$ : NULL
> str(y)
 num [1:242] 1 1 1 1 1 1 1 1 1 1 ...
@GabeAl GabeAl mentioned this issue Jun 27, 2019
@privefl
Copy link
Contributor

privefl commented Jun 27, 2019

Nice minimal reprex!

The problem is that you have a matrix of integers, whereas only doubles are supported.
Use X.bm <- as.big.matrix(X, type = "double").

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

No branches or pull requests

2 participants