SillyPutty-class | R Documentation |
A function that takes in an already existing starting location based on unsupervised clustering attempts. I.G. Kmeans or Hieriarchical cluster assignment. SillyPutty optimizes the pre-exisitng cluster assignments based on the best silhouette width score.
SillyPutty(labels, dissim, maxIter = 1000, loopSize = 15, verbose = FALSE)
labels |
A numeric vector containing pre-computed cluster labels |
dissim |
An object of class |
maxIter |
A numneric vetor of length one; the maximum number of individual steps, each of which reclassifies only one object |
loopSize |
How many steps to retain in momry to test if you have entered an infinite loop while rearranging objects. |
verbose |
A logical vector of length one; should you output a lot of information while running? |
The SillyPutty
function processes a pre-computed cluster assignment
along with a distance metric and returns a s4 object. The cluster
component is a list of the new cluster assignments based on best
silhouette width score. The silhouette
is a dataframe containing the
silhouette width score calculated by SillyPutty. The minSw
contains
a positive and negative version of the minimum silhouette width score.
The meanSW
is a double vector that shows the average silhouette width
score after applying SillyPutty to the cluster assignment.
The constructor function SillyPutty
, returns an object of
the SillyPutty
class.
cluster
:A list containing the adjusted cluster assignment that had the best silhouette width.
silhouette
:A dataframe containing the silhouette width scores.
minSW
:A silhouette double vector that contains the positive and negative version of the minimum silhouette width value.
meanSW
:A double vector that contains the average silhouette width value.
Kevin R. Coombes krc@silicovore.com, Dwayne G. Tally dtally110@hotmail.com
Pending
data(eucdist)
set.seed(12)
hc <- hclust(eucdist, "ward.D2")
clues <- cutree(hc, k = 5)
hcSilly <- SillyPutty(clues, eucdist)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.