example_cluster_template {handwriter} | R Documentation |
Example cluster template
Description
An example cluster template created from the template training example
handwriting documents included in the package. These documents are located in
system.file("extdata/example_images/template_training_images", package = "handwriter")
. The cluster template was created with K=10 clusters and a
small, random sample of 1000 graphs.
Usage
example_cluster_template
Format
A list containing a single cluster template created by
make_clustering_templates()
. The cluster template was created by
sorting a random sample of 1000 graphs from 10 training documents into 10
clusters with a K-means algorithm. The cluster template is a named list
with 16 items:
- seed
An integer for the random number generator.
- cluster
A vector of cluster assignments for each graph used to create the cluster template.
- centers
A list of graphs used as the starting cluster centers for the K-means algorithm.
- K
The number of clusters to build (10) with the K-means algorithm.
- n
The number of training graphs to use (1000) in the K-means algorithm.
- docnames
A vector that lists the training document from which each graph originated.
- writers
A vector that lists the writer of each graph.
- iters
The maximum number of iterations for the K-means algorithm (3).
- changes
A vector of the number of graphs that changed clusters on each iteration of the K-means algorithm.
- outlierCutoff
A vector of the outlier cutoff values calculated on each iteration of the K-means algorithm.
- stop_reason
The reason the K-means algorithm terminated.
- wcd
A matrix of the within cluster distances on each iteration of the K-means algorithm. More specifically, the distance between each graph and the center of the cluster to which it was assigned on each iteration.
- wcss
A vector of the within-cluster sum of squares on each iteration of the K-means algorithm.
- rmse
A vector of the root-mean square error on each iteration of the K-means algorithm.
- DaviesBouldinIndex
The Davies-Bouldin index on each iteration of the K-means algorithm.
- VarianceRatioCriterion
The variance-ratio criterion on each iteration of the K-means algorithm.
Examples
# view cluster fill counts for template training documents
template_data <- format_template_data(example_cluster_template)
plot_cluster_fill_counts(template_data, facet = TRUE)