Handwriter also supports K-means clustering of graphs.
To create a clustering template you can use createClusterTemplates()
createClusterTemplates() only has one required parameter, documentDirectory which is the folder where the documents to process reside.
Paths can also be provided for storage of log files, temp files, and results files. Otherwise, they will be stored within documentDirectory
Typical use cases:
#The most basic call, with only the documentDirectory providedcreateClusterTemplates("path/to/directory")#A call with the documentDirectory, resultsFile, 25 clusters and 5 cluster setscreateClusterTemplates(documentDirectory = "path/to/directory", resultsFile = "path/to/resultsfile", K = 25, numberToRun = 5)
The parameters for createClusterTemplates() include:
Representing the file where the results will be saved.
K | INTEGER | OPTIONAL | DEFAULT: 40
How many clusters will be created
numberToRun | INTEGER | OPTIONAL | DEFAULT: 1
How many cluster sets will be created.
numCores | INTEGER | OPTIONAL | DEFAULT: 1
Number of cores. Each clustering template will be created on a different core.
If you have the necessary resources this can significantly improve processing time.
numDistCores | INTEGER | OPTIONAL | DEFAULT: 1
Integer number of cores to use for distance calculations.
If you have the necessary resources this can significantly improve processing time.
iter.max | INTEGER | OPTIONAL | DEFAULT: 500
Integer maximum number of iterations to allow cluster centers to converge
gamma | INTEGER | OPTIONAL | DEFAULT: 3
Float parameter for calculating the outlier cutoff. If numOutliers is zero, gamma has no effect.