projects
/
clueless-kmeans.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5130629
)
Cosmetics.
author
Francois Fleuret
<francois@fleuret.org>
Thu, 28 Mar 2013 07:48:09 +0000
(08:48 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Thu, 28 Mar 2013 07:48:09 +0000
(08:48 +0100)
clusterer.cc
patch
|
blob
|
history
diff --git
a/clusterer.cc
b/clusterer.cc
index
02a8c8b
..
5418341
100644
(file)
--- a/
clusterer.cc
+++ b/
clusterer.cc
@@
-221,9
+221,9
@@
scalar_t Clusterer::uninformative_lp_cluster_association(int nb_points, scalar_t
for(int n = 1; n <= nb_points; n++) {
int col = n + nb_points * (k - 1);
for(int n = 1; n <= nb_points; n++) {
int col = n + nb_points * (k - 1);
- // The LP weight on th
is association coefficient for the global
- //
loss is the normalized distance of that sample to the
- // c
entroid of that c
luster
+ // The LP weight on th
e gammas for the global loss is the
+ //
normalized distance of that sample to the centroid of that
+ // cluster
glp_set_obj_coef(lp, col, distance_to_centroid(points[n-1], k-1));
glp_set_obj_coef(lp, col, distance_to_centroid(points[n-1], k-1));
@@
-234,8
+234,8
@@
scalar_t Clusterer::uninformative_lp_cluster_association(int nb_points, scalar_t
}
}
}
}
- // The (B) constraints: for each point, the sum of its
association
- //
coefficients is
equal to 1.0
+ // The (B) constraints: for each point, the sum of its
gamma is
+ // equal to 1.0
for(int n = 1; n <= nb_points; n++) {
int row = n;
for(int n = 1; n <= nb_points; n++) {
int row = n;
@@
-249,9
+249,8
@@
scalar_t Clusterer::uninformative_lp_cluster_association(int nb_points, scalar_t
}
// The (C) constraints: For each pair cluster/class, the sum of the
}
// The (C) constraints: For each pair cluster/class, the sum of the
- // association coefficient to this cluster for this class is equal
- // to the number of sample of that class, divided by the number of
- // clusters
+ // gammas for this cluster and this class is equal to the number of
+ // sample of that class, divided by the number of clusters
for(int k = 1; k <= _nb_clusters; k++) {
for(int c = 1; c <= nb_classes; c++) {
for(int k = 1; k <= _nb_clusters; k++) {
for(int c = 1; c <= nb_classes; c++) {