From d05a4c04f9106d26cb465c307263d0acf48e9828 Mon Sep 17 00:00:00 2001 From: tabpeter <85952288+tabpeter@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:30:51 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20pbreheny?= =?UTF-8?q?/biglasso@3bbfbaab94c0042f61df67fee5e78ee934a29af6=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- articles/biglasso.html | 10 +- articles/index.html | 2 +- authors.html | 2 +- index.html | 22 +-- news/index.html | 2 +- pkgdown.yml | 4 +- reference/biglasso-package.html | 2 +- reference/biglasso.html | 2 +- reference/biglasso_fit.html | 4 +- reference/biglasso_path.html | 276 +++++++++++++++++++++++++++++ reference/colon.html | 2 +- reference/cv.biglasso.html | 2 +- reference/index.html | 4 +- reference/loss.biglasso.html | 2 +- reference/plot.biglasso.html | 2 +- reference/plot.cv.biglasso.html | 2 +- reference/plot.mbiglasso.html | 2 +- reference/predict.biglasso.html | 2 +- reference/predict.cv.biglasso.html | 2 +- reference/setupX.html | 2 +- reference/summary.cv.biglasso.html | 2 +- sitemap.xml | 2 +- 23 files changed, 315 insertions(+), 39 deletions(-) create mode 100644 reference/biglasso_path.html diff --git a/404.html b/404.html index bff9e54..867848e 100644 --- a/404.html +++ b/404.html @@ -91,7 +91,7 @@

Page not found (404)

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/articles/biglasso.html b/articles/biglasso.html index 7b2fa4d..df4cc31 100644 --- a/articles/biglasso.html +++ b/articles/biglasso.html @@ -255,8 +255,8 @@

1.2 Big Data} #> Reading data from file, and creating file-backed big.matrix... #> This should take a while if the data is very large... -#> Start time: 2024-04-13 13:48:14 -#> End time: 2024-04-13 13:48:15 +#> Start time: 2024-04-19 13:30:43 +#> End time: 2024-04-19 13:30:44 #> DONE! #> #> Note: This function needs to be called only one time to create two backing @@ -276,7 +276,7 @@

1.2 Big Data
 system.time({fit <- biglasso(X.bm, y)})
 #>    user  system elapsed 
-#>   0.177   0.001   0.177
+#> 0.192 0.004 0.197
 plot(fit)

@@ -291,7 +291,7 @@

1.2 Big Data} ) #> user system elapsed -#> 0.282 0.000 2.740 +#> 0.297 0.006 2.819
 par(mfrow = c(2, 2), mar = c(3.5, 3.5, 3, 1), mgp = c(2.5, 0.5, 0))
 plot(cvfit, type = "all")
@@ -331,7 +331,7 @@

2 Useful Reference

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/articles/index.html b/articles/index.html index 8f676e9..179b651 100644 --- a/articles/index.html +++ b/articles/index.html @@ -65,7 +65,7 @@

All vignettes

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/authors.html b/authors.html index 890102f..bb2ef6e 100644 --- a/authors.html +++ b/authors.html @@ -100,7 +100,7 @@

Citation

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/index.html b/index.html index 5675904..e9ee52f 100644 --- a/index.html +++ b/index.html @@ -76,6 +76,16 @@

biglasso extends lasso and elastic-net linear and logistic regression models for ultrahigh-dimensional, multi-gigabyte data sets that cannot be loaded into memory. It utilizes memory-mapped files to store the massive data on the disk and only read those into memory whenever necessary during model fitting. Moreover, some advanced feature screening rules are proposed and implemented to accelerate the model fitting. As a result, this package is much more memory- and computation-efficient and highly scalable as compared to existing lasso-fitting packages such as glmnet and ncvreg. Bechmarking experiments using both simulated and real data sets show that biglasso is not only 1.5x to 4x times faster than existing packages, but also at least 2x more memory-efficient. More importantly, to the best of our knowledge, biglasso is the first R package that enables users to fit lasso models with data sets that are larger than available RAM, thus allowing for powerful big data analysis on an ordinary laptop.

+

Installation: +

+

To install the latest stable release version from CRAN:

+
+install.packages("biglasso")
+

To install the latest development version from GitHub:

+
+remotes::install_github("YaohuiZeng/biglasso")
+
+

News:

-

Installation: -

-

To install the latest stable release version from CRAN:

-
-install.packages("biglasso")
-

To install the latest development version from GitHub:

-
-remotes::install_github("YaohuiZeng/biglasso")
-
-

Reference:

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/pkgdown.yml b/pkgdown.yml index fa2f10c..e6649a2 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,7 +1,7 @@ pandoc: 3.1.11 -pkgdown: 2.0.8 +pkgdown: 2.0.9 pkgdown_sha: ~ articles: biglasso: biglasso.html -last_built: 2024-04-13T13:47Z +last_built: 2024-04-19T13:30Z diff --git a/reference/biglasso-package.html b/reference/biglasso-package.html index f09e9a2..0567c1e 100644 --- a/reference/biglasso-package.html +++ b/reference/biglasso-package.html @@ -226,7 +226,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/biglasso.html b/reference/biglasso.html index 7c13420..1bba051 100644 --- a/reference/biglasso.html +++ b/reference/biglasso.html @@ -407,7 +407,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/biglasso_fit.html b/reference/biglasso_fit.html index 2cc548c..063acdc 100644 --- a/reference/biglasso_fit.html +++ b/reference/biglasso_fit.html @@ -224,7 +224,7 @@

Details

Author

-

Yaohui Zeng, Chuyi Wang, Tabitha Peter, and Patrick Breheny

+

Tabitha Peter and Patrick Breheny

@@ -258,7 +258,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/biglasso_path.html b/reference/biglasso_path.html new file mode 100644 index 0000000..b99e76a --- /dev/null +++ b/reference/biglasso_path.html @@ -0,0 +1,276 @@ + +Simplified call to biglasso: a gaussian model fit with no 'bells and whistles' (e.g., no SSR) — biglasso_path • biglasso + + +
+
+ + + +
+
+ + +
+

NOTE: this function is designed for users who have a strong understanding of +statistics and know exactly what they are doing. This is a simplification of +the main `biglasso()` function with more flexible settings.

+
+ +
+
biglasso_path(
+  X,
+  y,
+  r,
+  init = rep(0, ncol(X)),
+  xtx,
+  penalty = "lasso",
+  lambda,
+  alpha = 1,
+  gamma,
+  ncores = 1,
+  max.iter = 1000,
+  eps = 1e-05,
+  dfmax = ncol(X) + 1,
+  penalty.factor = rep(1, ncol(X)),
+  warn = TRUE,
+  output.time = FALSE,
+  return.time = TRUE
+)
+
+ +
+

Arguments

+
X
+

The design matrix, without an intercept. It must be a +double type big.matrix object.

+ + +
y
+

The response vector

+ + +
r
+

Residuals (length n vector) corresponding to `init`. +WARNING: If you supply an incorrect value of `r`, the +solution will be incorrect.

+ + +
init
+

Initial values for beta. Default: zero (length p vector)

+ + +
xtx
+

X scales: the jth element should equal `crossprod(X[,j])/n`. +In particular, if X is standardized, one should pass +`xtx = rep(1, p)`. WARNING: If you supply an incorrect value of +`xtx`, the solution will be incorrect. (length p vector)

+ + +
penalty
+

String specifying which penalty to use. Default is 'lasso', +Other options are 'SCAD' and 'MCP' (the latter are non-convex)

+ + +
lambda
+

A vector of numeric values the lasso tuning parameter.

+ + +
alpha
+

The elastic-net mixing parameter that controls the relative +contribution from the lasso (l1) and the ridge (l2) penalty. +The penalty is defined as: +$$ \alpha||\beta||_1 + (1-\alpha)/2||\beta||_2^2.$$ +alpha=1 is the lasso penalty, alpha=0 the ridge penalty, +alpha in between 0 and 1 is the elastic-net ("enet") penalty.

+ + +
gamma
+

Tuning parameter value for nonconvex penalty. Defaults are +3.7 for `penalty = 'SCAD'` and 3 for `penalty = 'MCP'`

+ + +
ncores
+

The number of OpenMP threads used for parallel computing.

+ + +
max.iter
+

Maximum number of iterations. Default is 1000.

+ + +
eps
+

Convergence threshold for inner coordinate descent. The +algorithm iterates until the maximum change in the objective +after any coefficient update is less than eps times +the null deviance. Default value is 1e-7.

+ + +
dfmax
+

Upper bound for the number of nonzero coefficients. Default is +no upper bound. However, for large data sets, +computational burden may be heavy for models with a large +number of nonzero coefficients.

+ + +
penalty.factor
+

A multiplicative factor for the penalty applied to +each coefficient. If supplied, penalty.factor must be a numeric +vector of length equal to the number of columns of X.

+ + +
warn
+

Return warning messages for failures to converge and model +saturation? Default is TRUE.

+ + +
output.time
+

Whether to print out the start and end time of the model +fitting. Default is FALSE.

+ + +
return.time
+

Whether to return the computing time of the model +fitting. Default is TRUE.

+ +
+
+

Value

+ + +

An object with S3 class "biglasso" with following variables.

+
beta
+

A sparse matrix where rows are estimates a given coefficient across all values of lambda

+ +
iter
+

A vector of length nlambda containing the number of +iterations until convergence

+ +
resid
+

Vector of residuals calculated from estimated coefficients.

+ +
lambda
+

The sequence of regularization parameter values in the path.

+ +
alpha
+

Same as in `biglasso()`

+ +
loss
+

A vector containing either the residual sum of squares of the fitted model at each value of lambda.

+ +
penalty.factor
+

Same as in `biglasso()`.

+ +
n
+

The number of observations used in the model fitting.

+ +
y
+

The response vector used in the model fitting.

+ +
+
+

Details

+

Of note, this function:

+

* does NOT add an intercept + * does NOT standardize the design matrix + * does NOT set up a path for lambda (the lasso tuning parameter) automatically; + This vector of values must be user-supplied.

+

This function is made for use in situations where these steps have already been addressed prior + to model fitting.

+

In other words, `biglasso_path()` is doing the same thing as `biglasso_fit()`, + with the additional option to fit models across a path of tuning parameter values.

+

For now, this function only works with linear regression (`family = 'gaussian'`)

+
+
+

Author

+

Tabitha Peter and Patrick Breheny

+
+ +
+

Examples

+

+data(Prostate)
+X <- cbind(1, Prostate$X) |> ncvreg::std() # standardizing -> xtx is all 1s
+y <- Prostate$y
+X.bm <- as.big.matrix(X)
+init <- rep(0, ncol(X)) # using cold starts - will need more iterations
+r <- y - X%*%init
+fit_lasso <- biglasso_simple_path(X = X.bm, y = y, r = r, init = init,
+ xtx = rep(1, ncol(X)), lambda = c(0.5, 0.1, 0.05, 0.01, 0.001), 
+ penalty.factor=c(0, rep(1, ncol(X)-1)),
+  max.iter = 10000)   
+#> Error in biglasso_simple_path(X = X.bm, y = y, r = r, init = init, xtx = rep(1,     ncol(X)), lambda = c(0.5, 0.1, 0.05, 0.01, 0.001), penalty.factor = c(0,     rep(1, ncol(X) - 1)), max.iter = 10000): could not find function "biglasso_simple_path"
+  
+fit_mcp <- biglasso_simple_path(X = X.bm, y = y, r = r, init = init,
+ xtx = rep(1, ncol(X)), lambda = c(0.5, 0.1, 0.05, 0.01, 0.001),
+  penalty.factor=c(0, rep(1, ncol(X)-1)),
+  max.iter = 10000, penalty= 'MCP')  
+#> Error in biglasso_simple_path(X = X.bm, y = y, r = r, init = init, xtx = rep(1,     ncol(X)), lambda = c(0.5, 0.1, 0.05, 0.01, 0.001), penalty.factor = c(0,     rep(1, ncol(X) - 1)), max.iter = 10000, penalty = "MCP"): could not find function "biglasso_simple_path"
+  
+
+
+
+ +
+ + +
+ + + + + + + + diff --git a/reference/colon.html b/reference/colon.html index 749faff..908668d 100644 --- a/reference/colon.html +++ b/reference/colon.html @@ -113,7 +113,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/cv.biglasso.html b/reference/cv.biglasso.html index 274cd1f..e929faa 100644 --- a/reference/cv.biglasso.html +++ b/reference/cv.biglasso.html @@ -238,7 +238,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/index.html b/reference/index.html index e51a2be..d762404 100644 --- a/reference/index.html +++ b/reference/index.html @@ -66,7 +66,7 @@

All functions

Simplified call to biglasso: a gaussian model fit with no 'bells and whistles' (e.g., no SSR)

-

biglasso_simple_path()

+

biglasso_path()

Simplified call to biglasso: a gaussian model fit with no 'bells and whistles' (e.g., no SSR)

@@ -118,7 +118,7 @@

All functions
-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/loss.biglasso.html b/reference/loss.biglasso.html index 70c6e7d..805024b 100644 --- a/reference/loss.biglasso.html +++ b/reference/loss.biglasso.html @@ -111,7 +111,7 @@

Author

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/plot.biglasso.html b/reference/plot.biglasso.html index 611cb24..2fb073f 100644 --- a/reference/plot.biglasso.html +++ b/reference/plot.biglasso.html @@ -111,7 +111,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/plot.cv.biglasso.html b/reference/plot.cv.biglasso.html index d2f31d2..f84334c 100644 --- a/reference/plot.cv.biglasso.html +++ b/reference/plot.cv.biglasso.html @@ -145,7 +145,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/plot.mbiglasso.html b/reference/plot.mbiglasso.html index 865679f..a9d994a 100644 --- a/reference/plot.mbiglasso.html +++ b/reference/plot.mbiglasso.html @@ -116,7 +116,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/predict.biglasso.html b/reference/predict.biglasso.html index a8f24f9..52d001a 100644 --- a/reference/predict.biglasso.html +++ b/reference/predict.biglasso.html @@ -216,7 +216,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/predict.cv.biglasso.html b/reference/predict.cv.biglasso.html index ab69c2b..60046a4 100644 --- a/reference/predict.cv.biglasso.html +++ b/reference/predict.cv.biglasso.html @@ -166,7 +166,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/setupX.html b/reference/setupX.html index 847aa55..5a502e2 100644 --- a/reference/setupX.html +++ b/reference/setupX.html @@ -170,7 +170,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/reference/summary.cv.biglasso.html b/reference/summary.cv.biglasso.html index c3ff12c..9800419 100644 --- a/reference/summary.cv.biglasso.html +++ b/reference/summary.cv.biglasso.html @@ -154,7 +154,7 @@

Examples

-

Site built with pkgdown 2.0.8.

+

Site built with pkgdown 2.0.9.

diff --git a/sitemap.xml b/sitemap.xml index 61629f6..d8b2eb1 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -28,7 +28,7 @@ /reference/biglasso_fit.html - /reference/biglasso_simple_path.html + /reference/biglasso_path.html /reference/colon.html