plotMetric | R Documentation |
Plot one or more internal metrics for all lcModels
plotMetric(models, name, by = "nClusters", subset, group = character())
models |
A |
name |
The name(s) of the metric(s) to compute. If no names are given, the names specified in the |
by |
The argument name along which methods are plotted. |
subset |
Logical expression based on the |
group |
The argument names to use for determining groups of different models. By default,
all arguments are included.
Specifying |
ggplot2
object.
Print an argument summary for each of the models.
Convert to a data.frame
of method arguments.
Subset the list.
Compute an internal metric or external metric.
Obtain the best model according to minimizing or maximizing a metric.
Obtain the summed estimation time.
Plot a metric across a variable.
Plot the cluster trajectories.
Other lcModels functions:
as.lcModels()
,
lcModels
,
lcModels-class
,
max.lcModels()
,
min.lcModels()
,
print.lcModels()
,
subset.lcModels()
data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
methods <- lcMethods(method, nClusters = 1:3)
models <- latrendBatch(methods, latrendData)
if (require("ggplot2")) {
plotMetric(models, "WMAE")
}
if (require("ggplot2") && require("clusterCrit")) {
plotMetric(models, c("WMAE", "Dunn"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.