Learn R Programming

Cyclops

Cyclops is part of the HADES.

Introduction

Cyclops (Cyclic coordinate descent for logistic, Poisson and survival analysis) is an R package for performing large scale regularized regressions.

Features

  • Regression of very large problems: up to millions of observations, millions of variables
  • Supports (conditional) logistic regression, (conditional) Poisson regression, as well as (conditional) Cox regression
  • Uses a sparse representation of the independent variables when appropriate
  • Supports using no prior, a normal prior or a Laplace prior
  • Supports automatic selection of hyperparameter through cross-validation
  • Efficient estimation of confidence intervals for a single variable using a profile-likelihood for that variable

Examples

  library(Cyclops)
  cyclopsData <- createCyclopsDataFrame(formula)
  cyclopsFit <- fitCyclopsModel(cyclopsData)

Technology

Cyclops in an R package, with most functionality implemented in C++. Cyclops uses cyclic coordinate descent to optimize the likelihood function, which makes use of the sparse nature of the data.

System Requirements

Requires R (version 3.1.0 or higher). Compilation on Windows requires RTools >= 3.4.

Installation

In R, to install the latest stable version, install from CRAN:

install.packages("Cyclops")

To install the latest development version, install from GitHub. Note that this will require RTools to be installed.

install.packages("devtools")
devtools::install_github("OHDSI/Cyclops")

User Documentation

Documentation can be found on the package website.

PDF versions of the documentation are also available:

Support

  • Developer questions/comments/feedback: OHDSI Forum
  • We use the GitHub issue tracker for all bugs/issues/enhancements

Contributing

Read here how you can contribute to this package.

License

Cyclops is licensed under Apache License 2.0. Cyclops contains the TinyThread libray.

The TinyThread library is licensed under the zlib/libpng license as described here.

Development

Cyclops is being developed in R Studio.

Acknowledgements

  • This project is supported in part through the National Science Foundation grants IIS 1251151 and DMS 1264153.

Copy Link

Version

Install

install.packages('Cyclops')

Monthly Downloads

1,719

Version

3.6.0

License

Apache License 2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Marc A Suchard

Last Published

July 18th, 2025

Functions in Cyclops (3.6.0)

createPrior

Create a Cyclops prior object
getCovariateIds

Get covariate identifiers
getCrossValidationInfo

Get cross-validation information from a Cyclops model fit
getHyperParameter

Get hyperparameter
isInitialized

Check if a Cyclops data object is initialized
survfit.cyclopsFit

Calculate baseline hazard function
listGPUDevices

List available GPU devices
getFineGrayWeights

Creates a Surv object that forces in competing risks and the IPCW needed for Fine-Gray estimation.
getCyclopsProfileLogLikelihood

Profile likelihood for Cyclops model parameters
summary.cyclopsData

Cyclops data object summary
getFloatingPointSize

Get floating point size
predict.cyclopsFit

Model predictions
reduce

Apply simple data reductions
residuals.cyclopsFit

Model residuals
getUnivariableCorrelation

Get univariable correlation
getCovariateTypes

Get covariate types
createControl

Create a Cyclops control object
cyclopsLibraryFileName

Get full path to installed Cyclops library
getNumberOfStrata

Get number of strata
plotCyclopsSimulationFit

Plot Cyclops simulation model fit
finalizeSqlCyclopsData

finalizeSqlCyclopsData
getSEs

Extract standard errors
getCyclopsPredictiveLogLikelihood

Compute predictive log-likelihood from a Cyclops model fit
getNumberOfCovariates

Get total number of covariates
print.cyclopsFit

Print a Cyclops model fit object
fitCyclopsModel

Fit a Cyclops model
getUnivariableSeparability

Get univariable linear separability
fitCyclopsSimulation

Fit simulated data
printMatrixMarket

Print Cyclops data matrix to file
print.cyclopsData

Print a Cyclops data object
gradient

Extract gradient
readCyclopsData

Read Cyclops data from file
getNumberOfRows

Get total number of rows
getNumberOfTypes

Get total number of outcome types
mse

Mean squared error
oxford

Oxford self-controlled case series data
simulateCyclopsData

Simulation Cyclops dataset
testProportionality

Test hazard ratio proportionality assumption
splitTime

Split the analysis time into several intervals for time-varying coefficients.
vcov.cyclopsFit

Calculate variance-covariance matrix for a fitted Cyclops model object
logLik.cyclopsFit

Extract log-likelihood
setOpenCLDevice

Set GPU device
meanLinearPredictor

Calculates xbar*beta
runBootstrap

Run bootstrap for Cyclops model parameters
appendSqlCyclopsData

appendSqlCyclopsData
confint.cyclopsFit

Confidence intervals for Cyclops model parameters
convertToCyclopsData

Convert data from two data frames or ffdf objects into a CyclopsData object
clearCyclopsModelCache

Clear the Cyclops persistent cache
coef.cyclopsFit

Extract model coefficients
Multitype

Create a multitype outcome object
cacheCyclopsModelForJava

Place Cyclops model fit object in a persistent cache
createWeightBasedSearchControl

Create a Cyclops control object that supports in- / out-of-sample hyperparameter search using weights
createParameterizedPrior

Create a Cyclops parameterized prior object
cyclops

Cyclops: Cyclic coordinate descent for logistic, Poisson and survival analysis
convertToTimeVaryingCoef

Convert short sparse covariate table to long sparse covariate table for time-varying coefficients.
createAutoGridCrossValidationControl

Create a Cyclops control object that supports multiple hyperparameters
createCyclopsData

Create a Cyclops data object
coverage

Coverage
aconfint

Asymptotic confidence intervals for a fitted Cyclops model object
convertToGlmnetLambda

Convert to glmnet regularization parameter
convertToCyclopsVariance

Convert to Cyclops Prior Variance
createNonSeparablePrior

Create a Cyclops prior object that returns the MLE of non-separable coefficients