proportional_hazards()
is a way to generate a specification of a model
before fitting and allows the model to be created using different packages
in R. The main arguments for the model are:
penalty
: The total amount of regularization
in the model. Note that this must be zero for some engines.
mixture
: The mixture amounts of different types of
regularization (see below). Note that this will be ignored for some engines.
These arguments are converted to their specific names at the
time that the model is fit. Other options and arguments can be
set using set_engine()
. If left to their defaults
here (NULL
), the values are taken from the underlying model
functions. If parameters need to be modified, update()
can be used
in lieu of recreating the object from scratch.
proportional_hazards(
mode = "censored regression",
penalty = NULL,
mixture = NULL
)
A single character string for the type of model. Possible values for this model are "unknown", or "censored regression".
A non-negative number representing the total
amount of regularization (glmnet
, keras
, and spark
only).
For keras
models, this corresponds to purely L2 regularization
(aka weight decay) while the other models can be a combination
of L1 and L2 (depending on the value of mixture
; see below).
A number between zero and one (inclusive) that is the
proportion of L1 regularization (i.e. lasso) in the model. When
mixture = 1
, it is a pure lasso model while mixture = 0
indicates that
ridge regression is being used. (glmnet
and spark
only).
Proportional hazards models include the Cox model.
For proportional_hazards()
, the mode will always be "censored regression".
# NOT RUN {
show_engines("proportional_hazards")
# }
Run the code above in your browser using DataLab