plot.cat_tune | R Documentation |
This function generates a plot showing the relationship between
the tuning parameter tau
and either the likelihood score (for a cat_cox_tune
model)
or the risk estimate (for other models) during cross-validation or other model evaluation methods.
The plot highlights the optimal tau
value and provides visual cues for
the best tuning parameter based on the specified method.
## S3 method for class 'cat_tune'
plot(x, digit = 2, legend_pos = "topright", text_pos = 3, ...)
x |
A fitted model object of class |
digit |
An integer specifying the number of decimal places to round the displayed values (default is 2). |
legend_pos |
A character string specifying the position of the legend on
the plot (default is |
text_pos |
An integer specifying the position of the text label on the plot (default is 3, which places the text above the point). |
... |
Additional parameters to pass to other functions. |
The function generates a line plot with tau_seq
on the x-axis and either
the likelihood score or risk estimate on the y-axis. If the model is of class
cat_cox_tune
, the plot shows the likelihood score, while for other models,
it shows the risk estimates. The optimal tau
is marked with a red cross,
and red dashed lines are drawn to highlight the optimal point on the plot.
A plot with the specified y-values plotted against tau_seq
,
including a highlighted optimal tau
point.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.