be.ac.ulg.montefiore.run.jahmm
Interface Centroid<O>

All Known Implementing Classes:
CentroidObservationInteger, CentroidObservationReal, CentroidObservationVector

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

reevaluateAdd

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.

Parameters:
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.

reevaluateRemove

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.

Parameters:
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.

distance

double distance(O e)
Returns the distance from this centroid to a given element.

Parameters:
e - The element.
Returns:
The distance to the centroid.


Copyright © 2004,2005 Jean-Marc François.