performance_plot | R Documentation |
This function generates plots to visualize model performance
performance_plot(
model_list,
type = "box",
text_size = 10,
palette = "viridis",
save = FALSE,
file_path = NULL,
file_name = "Performance_plot",
file_type = "pdf",
plot_width = 7,
plot_height = 7,
dpi = 80
)
model_list |
A |
type |
Type of plot to generate. Choices are "box" or "dot."
Default is |
text_size |
Text size for plot labels, axis labels etc. Default is
|
palette |
Viridis color palette option for plots. Default is
|
save |
Logical. If |
file_path |
A string containing the directory path to save the file. |
file_name |
File name to save the plot.
Default is |
file_type |
File type to save the plot.
Default is |
plot_width |
Width of the plot. Default is |
plot_height |
Height of the plot. Default is |
dpi |
Plot resolution. Default is |
performance_plot
uses resampling results from
models included in the model_list
to generate plots showing model
performance.
The default metrics used for classification based models are "Accuracy" and "Kappa."
These metric types can be changed by providing additional arguments to
the train_models
function. See train
and
trainControl
for more information.
A ggplot2
object.
Chathurani Ranathunge
train_models
resamples
train
trainControl
## Create a model_df object
covid_model_df <- pre_process(covid_fit_df, covid_norm_df)
## Split the data frame into training and test data sets
covid_split_df <- split_data(covid_model_df)
## Fit models based on the default list of machine learning (ML) algorithms
covid_model_list <- train_models(covid_split_df)
## Generate box plots to visualize performance of different ML algorithms
performance_plot(covid_model_list)
## Generate dot plots
performance_plot(covid_model_list, type = "dot")
## Change color palette
performance_plot(covid_model_list, type = "dot", palette = "inferno")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.