View source: R/utility_functions.R
pareto_plot | R Documentation |
Plots the given data with pairwise scatter plots for each pair of given columns.
Intended to be used with scoring
output.
pareto_plot(
scores,
plot_palette = pals::watlington(16),
metrics = c("TrainStabilityJaccard", "Silhouette", "Smallest_cluster_size"),
metrics_scale = rep("identity", length(metrics)),
color_var = Transform,
shape_var = Clustering,
size_var = k,
size_range = c(2, 6),
size_guide = ggplot2::guide_legend(ncol = 1, order = 3),
color_scale = ggplot2::scale_color_manual(values = plot_palette),
color_guide = ggplot2::guide_legend(ncol = 1, order = 1),
shape_scale = ggplot2::scale_shape_manual(values = 0:14),
shape_guide = ggplot2::guide_legend(ncol = 1, order = 2),
plot_pareto_front = FALSE,
front_color = "black",
metric_comparators = if (plot_pareto_front) get_metric_comparators(metrics) else NULL,
point_args = list()
)
scores |
|
plot_palette |
color codes used for coloring based on |
metrics |
column names in |
metrics_scale |
either "identity" or "nlog10" where the latter is meant for translating p-values to negative log10 |
color_var |
column name in |
shape_var |
column name in |
size_var |
column name in |
size_range |
controls the range of point sizes |
size_guide |
can be used to adjust the size legend |
color_scale |
can be used instead of |
color_guide |
can be used to adjust the color legend (see |
shape_scale |
can be used to control point shapes |
shape_guide |
can be used to control the shape legend |
plot_pareto_front |
If |
front_color |
color of pairwise Pareto front step-function. |
metric_comparators |
Required if |
point_args |
list of additional arguments passed to |
For Pareto fronts metric_comparators
should be a list of .Primitive(">")
and .Primitive("<")
.
">" should be used for metrics that should be maximized and
"<" for metrics that should minimized. By default they are guessed by
get_metric_comparators
, but for plots involving variable
associations and p-values they should be set manually.
grid.arrange
result
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.