|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.ml.clustering.Clusterer<T>
T
- the type of points that can be clusteredpublic abstract class Clusterer<T extends Clusterable>
Base class for clustering algorithms.
Constructor Summary | |
---|---|
protected |
Clusterer(DistanceMeasure measure)
Build a new clusterer with the given DistanceMeasure . |
Method Summary | |
---|---|
abstract List<? extends Cluster<T>> |
cluster(Collection<T> points)
Perform a cluster analysis on the given set of Clusterable instances. |
protected double |
distance(Clusterable p1,
Clusterable p2)
Calculates the distance between two Clusterable instances
with the configured DistanceMeasure . |
DistanceMeasure |
getDistanceMeasure()
Returns the DistanceMeasure instance used by this clusterer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Clusterer(DistanceMeasure measure)
DistanceMeasure
.
measure
- the distance measure to useMethod Detail |
---|
public abstract List<? extends Cluster<T>> cluster(Collection<T> points) throws MathIllegalArgumentException, ConvergenceException
Clusterable
instances.
points
- the set of Clusterable
instances
List
of clusters
MathIllegalArgumentException
- if points are null or the number of
data points is not compatible with this clusterer
ConvergenceException
- if the algorithm has not yet converged after
the maximum number of iterations has been exceededpublic DistanceMeasure getDistanceMeasure()
DistanceMeasure
instance used by this clusterer.
protected double distance(Clusterable p1, Clusterable p2)
Clusterable
instances
with the configured DistanceMeasure
.
p1
- the first clusterablep2
- the second clusterable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |