Interface IStratiAssigner<I,D extends IDataset<I>>
-
- All Known Implementing Classes:
AttributeBasedStratiAmountSelectorAndAssigner,ClusterStratiAssigner,GMeansStratiAmountSelectorAndAssigner,KMeansStratiAssigner
public interface IStratiAssigner<I,D extends IDataset<I>>Interface to write custom Assigner for datapoints to strati.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intassignToStrati(I datapoint)Custom logic for assigning datapoints into strati.intgetNumCPUs()voidinit(D dataset, int stratiAmount)Initialize custom assigner if necessary.voidsetNumCPUs(int numberOfCPUs)Sets the number of CPU cores that can be used for parallel computation
-
-
-
Method Detail
-
init
void init(D dataset, int stratiAmount)
Initialize custom assigner if necessary.- Parameters:
dataset- The dataset the datapoints will be sampled from.stratiAmount- The predetermined amount of strati the dataset will be stratified into.
-
assignToStrati
int assignToStrati(I datapoint)
Custom logic for assigning datapoints into strati.- Parameters:
datapoint- The datapoint that has to be assigned.- Returns:
- The index of the strati the datapoint will be assigned into.
-
setNumCPUs
void setNumCPUs(int numberOfCPUs)
Sets the number of CPU cores that can be used for parallel computation- Parameters:
numberOfCPUs-
-
getNumCPUs
int getNumCPUs()
-
-