|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Centroid<O>
The centroid (basically, the mean) of a cluster. Used by the k-means algorithm.
| Method Summary | |
|---|---|
double |
distance(O e)
Returns the distance from this centroid to a given element. |
void |
reevaluateAdd(O e,
java.util.List<? extends O> v)
Reevalue the value of this centroid, knowing that it currently is the centroid of the observations composing v and that we
want it to be the centroid of v plus the value of the
observation e. |
void |
reevaluateRemove(O e,
java.util.List<? extends O> v)
Reevalue the value of this centroid, knowing that it currently is the centroid of the observations composing v and that we want
it to be the centroid of v minus the value of the
observation e. |
| Method Detail |
|---|
void reevaluateAdd(O e,
java.util.List<? extends O> v)
v and that we
want it to be the centroid of v plus the value of the
observation e.
e - An observation that must be involved in the computation
of the new value of this centroid.v - The set of observations that gave the current value of this
centroid.
void reevaluateRemove(O e,
java.util.List<? extends O> v)
v and that we want
it to be the centroid of v minus the value of the
observation e.
e - An observation that must not be involved in the computation
of the new value of this centroid.v - The set of observations (which holds o) that gave
the current value of this centroid.double distance(O e)
e - The element.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||