predict.fast_logistic_regression {fastLogisticRegressionWrap} | R Documentation |
FastLR Wrapper Predictions
Description
Predicts returning p-hats
Usage
## S3 method for class 'fast_logistic_regression'
predict(object, newdata, type = "response", ...)
Arguments
object |
The object built using the |
newdata |
A matrix of observations where you wish to predict the binary response. |
type |
The type of prediction required. The default is |
... |
Further arguments passed to or from other methods |
Value
A numeric vector of length nrow(newdata)
of estimates of P(Y = 1) for each unit in newdata
.
Examples
library(MASS); data(Pima.te)
flr = fast_logistic_regression(
Xmm = model.matrix(~ . - type, Pima.te),
ybin = as.numeric(Pima.te$type == "Yes")
)
phat = predict(flr, model.matrix(~ . - type, Pima.te))
[Package fastLogisticRegressionWrap version 1.2.0 Index]