Predict from, tidy, plot, or collect the metrics of a [cv_coxnet()] result. Predictions and coefficients come from the model refit to all the data at the chosen `mixture`.
Usage
# S3 method for class 'cv_coxnet'
predict(
object,
new_data,
type = c("linear_pred", "survival"),
penalty = "lambda.min",
eval_time = NULL,
increasing = TRUE,
...
)
# S3 method for class 'cv_coxnet'
tidy(x, penalty = "lambda.min", ...)
# S3 method for class 'cv_coxnet'
collect_metrics(x, ..., summarize = TRUE)
# S3 method for class 'cv_coxnet'
autoplot(object, ...)Arguments
- object, x
A [cv_coxnet()] result.
- new_data
A data frame of new predictors.
- type
`"linear_pred"` (the default), `"survival"`, or `"time"` (restricted mean survival time), as for [predict.coxnet_model()].
- penalty
`"lambda.min"` (default), `"lambda.1se"`, or a number.
- eval_time, increasing
As for [predict.coxnet_model()].
- ...
Not used.
- summarize
For `collect_metrics()`: `TRUE` for means over resamples, `FALSE` for each resample's metrics.
