projects
/
clueless-kmeans.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a new "non-absolute" criterion that enforces the proportions of classes in...
[clueless-kmeans.git]
/
clusterer.h
diff --git
a/clusterer.h
b/clusterer.h
index
584828e
..
6fa5382
100644
(file)
--- a/
clusterer.h
+++ b/
clusterer.h
@@
-31,9
+31,16
@@
class Clusterer {
public:
enum {
public:
enum {
+ // Standard k-mean
STANDARD_ASSOCIATION,
STANDARD_ASSOCIATION,
+ // Same, implemented as a LP problem for sanity check
STANDARD_LP_ASSOCIATION,
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;
};
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 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);
void update_clusters(int nb_points, scalar_t **points, scalar_t **gamma);