|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.clustering.canopy.CanopyClusterer
public class CanopyClusterer
| Constructor Summary | |
|---|---|
CanopyClusterer(org.apache.hadoop.conf.Configuration config)
|
|
CanopyClusterer(DistanceMeasure measure,
double t1,
double t2)
|
|
| Method Summary | |
|---|---|
void |
addPointToCanopies(Vector point,
Collection<Canopy> canopies)
This is the same algorithm as the reference but inverted to iterate over existing canopies instead of the points. |
boolean |
canopyCovers(Canopy canopy,
Vector point)
Return if the point is covered by the canopy |
void |
config(DistanceMeasure aMeasure,
double aT1,
double aT2)
Configure the Canopy for unit tests |
void |
configure(org.apache.hadoop.conf.Configuration configuration)
Configure the Canopy and its distance measure |
static List<Canopy> |
createCanopies(List<Vector> points,
DistanceMeasure measure,
double t1,
double t2)
Iterate through the points, adding new canopies. |
static List<Vector> |
getCenters(Iterable<Canopy> canopies)
Iterate through the canopies, adding their centroids to a list |
double |
getT1()
|
double |
getT2()
|
double |
getT3()
|
double |
getT4()
|
static void |
updateCentroids(Iterable<Canopy> canopies)
Iterate through the canopies, resetting their center to their centroids |
void |
useT3T4()
Used by CanopyReducer to set t1=t3 and t2=t4 configuration values |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CanopyClusterer(DistanceMeasure measure,
double t1,
double t2)
public CanopyClusterer(org.apache.hadoop.conf.Configuration config)
| Method Detail |
|---|
public double getT1()
public double getT2()
public double getT3()
public double getT4()
public void configure(org.apache.hadoop.conf.Configuration configuration)
configuration - the Configurationpublic void useT3T4()
public void config(DistanceMeasure aMeasure,
double aT1,
double aT2)
aMeasure - the DistanceMeasureaT1 - the T1 distance thresholdaT2 - the T2 distance threshold
public void addPointToCanopies(Vector point,
Collection<Canopy> canopies)
point - the point to be addedcanopies - the List
public boolean canopyCovers(Canopy canopy,
Vector point)
point - a point
public static List<Canopy> createCanopies(List<Vector> points,
DistanceMeasure measure,
double t1,
double t2)
points - a listmeasure - a DistanceMeasure to uset1 - the T1 distance thresholdt2 - the T2 distance threshold
public static List<Vector> getCenters(Iterable<Canopy> canopies)
canopies - a Listpublic static void updateCentroids(Iterable<Canopy> canopies)
canopies - a List
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||