createFastIhtPrior {IterativeHardThresholding} | R Documentation |
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))
[Package IterativeHardThresholding version 1.0.2 Index]