The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
IterativeHardThresholding is part of the HADES.
IterativeHardThresholding is an R package
for performing L_0-based regressions using Cyclops
library(Cyclops)
library(IterativeHardThresholding)
library(survival)
## data dimension
p <- 20 # number of covariates
n <- 300 # sample size
## Cox model parameters
true.beta <- c(1, 0.1, 0, -1, 1, rep(0, p - 5))
## simulate data from an exponential model
x <- matrix(rnorm(p * n, mean = 0, sd = 1), ncol = p)
ti <- rweibull(n, shape = 1, scale = exp(-x%*%true.beta))
ui <- runif(n, 0, 10) # Controls censoring
ci <- rweibull(n, shape = 1, scale = ui * exp(-x%*%true.beta))
survtime <- pmin(ti, ci)
delta <- ti == survtime; mean(delta)
cyclopsData <- createCyclopsData(Surv(survtime, delta) ~ x, modelType = "cox")
ihtPrior <- createIhtPrior(K = 3, penalty = "bic")
cyclopsFit <- fitCyclopsModel(cyclopsData,
prior = ihtPrior)
coef(cyclopsFit)library(Cyclops)
library(IterativeHardThresholding)
## data dimension
p <- 20 # number of covariates
n <- 300 # sample size
## logistic model parameters
itcpt <- 0.2 # intercept
true.beta <- c(1, 0.3, 0, -1, 1, rep(0, p - 5))
## simulate data from logistic model
x <- matrix(rnorm(p * n, mean = 0, sd = 1), ncol = p)
y <- rbinom(n, 1, 1 / (1 + exp(-itcpt - x%*%true.beta)))
# fit BAR model
cyclopsData <- createCyclopsData(y ~ x, modelType = "lr")
ihtPrior <- createIhtPrior(K = 3, penalty = "bic", exclude = c("(Intercept)"))
cyclopsFit <- fitCyclopsModel(cyclopsData,
prior = ihtPrior)
coef(cyclopsFit)Requires R (version 3.2.0 or higher).
CyclopsIterativeHardThresholding:install.packages("Cyclops")
install.packages("IterativeHardThresholding")library(IterativeHardThresholding)
cyclopsData <- createCyclopsData(formula, modelType = "modelType") ## TODO: Update
ihtPrior <- createIhtPrior(K = 5, penalty = "bic")
cyclopsFit <- fitCyclopsModel(cyclopsData, prior = ihtPrior)
coef(cyclopsFit) #Extract coefficientsIterativeHardThresholding is licensed under Apache
License 2.0.
IterativeHardThresholding is being developed in R
Studio.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.