fastLogisticModel {RcppLbfgsBlaze} | R Documentation |
Logistic Regression Fitting Using L-BFGS Algorithm
Description
This function leverage blaze
and LBFGS-Blaze
to efficiently fit logistic regression.
Usage
fastLogisticModel(X, y)
Arguments
X |
The model matrix. |
y |
The response vector. |
Value
A list of L-BFGS optimization result.
Examples
X <- matrix(rnorm(5000), 1000)
coef <- runif(5, -3, 3)
y <- sapply(1 / (1 + exp(-X %*% coef)), function(p) rbinom(1, 1, p), USE.NAMES = FALSE)
fit <- fastLogisticModel(X, y)
[Package RcppLbfgsBlaze version 0.1.0 Index]