Package 'IterativeHardThresholding'

Title: Iterative Hard Thresholding Extensions to Cyclops
Description: Fits large-scale regression models with a penalty that restricts the maximum number of non-zero regression coefficients to a prespecified value. While Chu et al (2020) <doi:10.1093/gigascience/giaa044> describe the basic algorithm, this package uses Cyclops for an efficient implementation.
Authors: Marc A. Suchard [aut, cre], Patrick Ryan [aut], Observational Health Data Sciences and Informatics [cph]
Maintainer: Marc A. Suchard <[email protected]>
License: Apache License 2.0
Version: 1.0.2
Built: 2024-11-23 04:03:15 UTC
Source: https://github.com/cran/IterativeHardThresholding

Help Index


Create a fastIHT Cyclops prior object

Description

createFastIhtPrior creates a fastIHT Cyclops prior object for use with fitCyclopsModel.

Usage

createFastIhtPrior(
  K,
  penalty = 0,
  exclude = c(),
  forceIntercept = FALSE,
  fitBestSubset = FALSE,
  initialRidgeVariance = 10000,
  tolerance = 1e-08,
  maxIterations = 10000,
  threshold = 1e-06
)

Arguments

K

Maximum # of non-zero covariates

penalty

Specifies the IHT penalty

exclude

A vector of numbers or covariateId names to exclude from prior

forceIntercept

Logical: Force intercept coefficient into regularization

fitBestSubset

Logical: Fit final subset with no regularization

initialRidgeVariance

Numeric: variance used for algorithm initiation

tolerance

Numeric: maximum abs change in coefficient estimates from successive iterations to achieve convergence

maxIterations

Numeric: maximum iterations to achieve convergence

threshold

Numeric: absolute threshold at which to force coefficient to 0

Value

An IHT Cyclops prior object of class inheriting from "cyclopsPrior" for use with fitCyclopsModel.

Examples

nobs = 500; ncovs = 100
prior <- createFastIhtPrior(K = 3, penalty = log(ncovs), initialRidgeVariance = 1 / log(ncovs))

Create an IHT Cyclops prior object

Description

createIhtPrior creates an IHT Cyclops prior object for use with fitCyclopsModel.

Usage

createIhtPrior(
  K,
  penalty = "bic",
  exclude = c(),
  forceIntercept = FALSE,
  fitBestSubset = FALSE,
  initialRidgeVariance = 0.1,
  tolerance = 1e-08,
  maxIterations = 10000,
  threshold = 1e-06,
  delta = 0
)

Arguments

K

Maximum # of non-zero covariates

penalty

Specifies the IHT penalty; possible values are 'BIC' or 'AIC' or a numeric value

exclude

A vector of numbers or covariateId names to exclude from prior

forceIntercept

Logical: Force intercept coefficient into regularization

fitBestSubset

Logical: Fit final subset with no regularization

initialRidgeVariance

Numeric: variance used for algorithm initiation

tolerance

Numeric: maximum abs change in coefficient estimates from successive iterations to achieve convergence

maxIterations

Numeric: maximum iterations to achieve convergence

threshold

Numeric: absolute threshold at which to force coefficient to 0

delta

Numeric: change from 2 in ridge norm dimension

Value

An IHT Cyclops prior object of class inheriting from "cyclopsPrior" for use with fitCyclopsModel.

Examples

prior <- createIhtPrior(K = 10)