Create Clustering

This piece of code reads in two csv files: "file_1.csv" which provides the categories for which to conduct the clustering and "file_2.csv" which provides the actual data over which to the the clustering. The code creates a file: "output_instance_matrix.csv" which contains the matrix of 0 and 1 for whether the initial file "file_2.csv" displayed the category in "file_1.csv" (1 for yes, 0 for no).

The actual clustering is the carried out in R as found this is faster. The R code is shown from line 100. I use the dynamic clustering library to dynamically identify the right number of clusters to produce and then plot those into histograms.