Added a new "non-absolute" criterion that enforces the proportions of classes in...
[clueless-kmeans.git] / clusterer.h
index 584828e..6fa5382 100644 (file)
@@ -31,9 +31,16 @@ class Clusterer {
 public:
 
   enum {
+    // Standard k-mean
     STANDARD_ASSOCIATION,
+    // Same, implemented as a LP problem for sanity check
     STANDARD_LP_ASSOCIATION,
-    UNINFORMATIVE_LP_ASSOCIATION
+    // Criterion forcing to have the same distribution of classes in
+    // all clusters
+    UNINFORMATIVE_LP_ASSOCIATION,
+    // Criterion forcing to have the same number of samples of each
+    // class in all clusters
+    UNINFORMATIVE_LP_ASSOCIATION_ABSOLUTE
   };
 
   const static int max_nb_iterations = 10;
@@ -66,7 +73,8 @@ public:
 
   scalar_t uninformative_lp_cluster_association(int nb_points, scalar_t **points,
                                                 int nb_classes, int *labels,
-                                                scalar_t **gamma);
+                                                scalar_t **gamma,
+                                                int absolute_proportion);
 
   void update_clusters(int nb_points, scalar_t **points, scalar_t **gamma);