README

set.seed(150)

pkg_version <- packageVersion(params$pkg)

x_dcf <- read.dcf(file = file.path(getwd(), "..", "DESCRIPTION"))

if("GitHubRepo" %in% colnames(x_dcf)) {
  pkg_branch <- x_dcf[1,"GitHubRepo"]

  pkg_version_type <- switch(pkg_branch,
    release = "release",
    master = "release candidate",
    develop = "development version"
  )
} else {
  pkg_branch <- "release"
  pkg_version_type <- "release"
}

High Dimensional Linear Multiple-Response Regression

CRAN_Status_Badge Travis-CI Build Status AppVeyor Build Status Coverage Status

Linear multiple-response regression with feature and parameter selection using sparse group lasso. Suitable for high dimensional problems.

This is the r pkg_version_type of R package lsgl version r pkg_version.

R-package Overview

This package implements procedures for working with linear multiple-response regression models using sparse group lasso. This includes procedures for fitting and cross validating sparse models in a high dimensional setup. See the Quick Start (Predict airline ticket prices for multiple airlines) for an example of a traditional workflow consisting of 1) model selection and assessment using cross validation, 2) estimation of a final model and 3) using the selected model for carrying out predictions on new data.

The multiple lasso estimator and the least squares estimate

Comparison of the multiple lasso estimator and least squares estimate on simulated data with 50 samples, 50 features and 25 groups. See the lsgl example in the package, i.e. run example(lsgl).

Package highlights:

The penalized maximum likelihood estimator for the linear multiple-response regression model is computed using a coordinate gradient descent algorithm via the sglOptim optimizer. Use of parallel computing for cross validation and subsampling is supported through the foreach and doParallel packages.

Status

The package is under active development with releases to CRAN about ones or twice each year.

Installation

Get the released version from CRAN:

install.packages("lsgl")

Install the release candidate from GitHub:

# install.packages("devtools")
devtools::install_github("vincent-dk/sglOptim")
devtools::install_github("vincent-dk/lsgl")

Install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("vincent-dk/sglOptim", ref = "develop")
devtools::install_github("vincent-dk/lsgl", ref = "develop")

Minimal Example

library(lsgl)

# Load sone data
data(AirlineTicketPrices)

# Setup 2 parallel units
cl <- makeCluster(2)
registerDoParallel(cl)

# Do 10-fold cross validation on 100 models with increasing complexity, using the 2 parallel units
fit.cv <- lsgl::cv(
  x = X,
  y = Y,
  alpha = 0.5,
  lambda = 0.01,
  use_parallel = TRUE
)

stopCluster(cl)

# Print information about models
# and cross validation errors
fit.cv

Documentation

Author

Martin Vincent

License

GPL (>=2)



Try the lsgl package in your browser

Any scripts or data that you put into this service are public.

lsgl documentation built on May 29, 2017, 11:43 a.m.