Class PartitionFunctions.BalancedPartition<DATA>
- java.lang.Object
-
- moa.clusterers.outliers.utils.mtree.PartitionFunctions.BalancedPartition<DATA>
-
- Type Parameters:
DATA
- The type of the data objects.
- All Implemented Interfaces:
PartitionFunction<DATA>
- Enclosing class:
- PartitionFunctions
public static class PartitionFunctions.BalancedPartition<DATA> extends Object implements PartitionFunction<DATA>
A partition function that tries to distribute the data objects equally between the promoted data objects, associating to each promoted data objects the nearest data objects.
-
-
Constructor Summary
Constructors Constructor Description BalancedPartition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<Set<DATA>>
process(Pair<DATA> promoted, Set<DATA> dataSet, DistanceFunction<? super DATA> distanceFunction)
Processes the balanced partition.
-
-
-
Method Detail
-
process
public Pair<Set<DATA>> process(Pair<DATA> promoted, Set<DATA> dataSet, DistanceFunction<? super DATA> distanceFunction)
Processes the balanced partition.The algorithm is roughly equivalent to this:
While dataSet is not Empty: X := The object in dataSet which is nearest to promoted.first Remove X from dataSet Add X to result.first Y := The object in dataSet which is nearest to promoted.second Remove Y from dataSet Add Y to result.second Return result
- Specified by:
process
in interfacePartitionFunction<DATA>
- Parameters:
promoted
- The pair of data objects that will guide the partition process.dataSet
- The original set of data objects to be partitioned.distanceFunction
- A distance function to be used on the partitioning.- Returns:
- A pair of partition sub-sets. Each sub-set must correspond to one
of the
promoted
data objects. - See Also:
PartitionFunction.process(Pair, java.util.Set, DistanceFunction)
-
-