1 function get_cluster_mappings(X, k_min, k_max, fileprefix)
\r
4 [model c] = em_kmc(X, i);
\r
5 filename = sprintf('%s-%d', fileprefix, i);
\r
6 f = fopen(filename, 'w');
\r
7 % Write out the name of the file and the training example
\r
9 fprintf(f, '%s,%d,%f\n', X.obs(i).name, c(i).best_cluster, model.priors(c(i).best_cluster));
\r