public class GMeansStratiAmountSelectorAndAssigner<I extends IInstance> extends ClusterStratiAssigner<I> implements IStratiAmountSelector<I>
clusters, distanceMeasure, randomSeed| Constructor and Description |
|---|
GMeansStratiAmountSelectorAndAssigner(org.apache.commons.math3.ml.distance.DistanceMeasure distanceMeasure,
int randomSeed)
Constructor for GMeansStratiAmountSelectorAndAssigner with custom
distanceMeasure.
|
GMeansStratiAmountSelectorAndAssigner(int randomSeed)
Constructor for GMeansStratiAmountSelectorAndAssigner with Manhattan
distanceMeasure as a default.
|
| Modifier and Type | Method and Description |
|---|---|
void |
init(IDataset<I> dataset,
int stratiAmount)
Initialize custom assigner if necessary.
|
int |
selectStratiAmount(IDataset<I> dataset)
Select a suitable amount of strati for a Dataset.
|
assignToStrati, getNumCPUs, setNumCPUsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNumCPUs, setNumCPUspublic GMeansStratiAmountSelectorAndAssigner(int randomSeed)
randomSeed - Seed for random numbers.public GMeansStratiAmountSelectorAndAssigner(org.apache.commons.math3.ml.distance.DistanceMeasure distanceMeasure,
int randomSeed)
distanceMeasure - Distance measure for datapoints, for example Manhattan or
Euclidian.randomSeed - Seed for random numbers.public int selectStratiAmount(IDataset<I> dataset)
IStratiAmountSelectorselectStratiAmount in interface IStratiAmountSelector<I extends IInstance>dataset - The dataset that will be stratified.public void init(IDataset<I> dataset, int stratiAmount)
IStratiAssignerinit in interface IStratiAssigner<I extends IInstance>dataset - The dataset the datapoints will be sampled from.stratiAmount - The predetermined amount of strati the dataset will be stratified into.