Wrap zeroSum::predict.zeroSum()
into a patroklos-compliant predict function
predict.ptk_zerosum.Rd
Model$predict()
uses this function as a predict method for
the predict()
generic.
Usage
# S3 method for class 'ptk_zerosum'
predict(object, newx, ...)
Value
A numeric vector with the prediction for every sample. Unlike
zeroSum::predict.zeroSum()
,
if
object$type == 2
(i.e.,object
was fitted withfamily = "binomial" by
ptk_zerosum`), the predictions are binomial probabilities,if
object$type == 4
(i.e.,object
was fitted withfamily = "cox" by
ptk_zerosum), the predictions are the exponential of the linear predictor, i.e.,
exp(beta_0 + beta^T x)`.If
object$binarizePredictions
is notNULL
, the predictions are binarized viaas.numeric(y > object$binarizePredictions)
.