public class StratifiedSamplingFactory<I extends IInstance> extends java.lang.Object implements IRerunnableSamplingAlgorithmFactory<I,StratifiedSampling<I>>
| Constructor and Description |
|---|
StratifiedSamplingFactory(IStratiAmountSelector<I> stratiAmountSelector,
IStratiAssigner<I> stratiAssigner) |
| Modifier and Type | Method and Description |
|---|---|
StratifiedSampling<I> |
getAlgorithm(int sampleSize,
IDataset<I> inputDataset,
java.util.Random random)
After the necessary config is done, this method returns a fully configured
instance of a sampling algorithm.
|
void |
setPreviousRun(StratifiedSampling<I> previousRun)
Set the previous run of the sampling algorithm, if one occurred, can be set
here to get data from it.
|
public StratifiedSamplingFactory(IStratiAmountSelector<I> stratiAmountSelector, IStratiAssigner<I> stratiAssigner)
public void setPreviousRun(StratifiedSampling<I> previousRun)
IRerunnableSamplingAlgorithmFactorysetPreviousRun in interface IRerunnableSamplingAlgorithmFactory<I extends IInstance,StratifiedSampling<I extends IInstance>>previousRun - Algorithm object of the previous of the sampling
algorithm.public StratifiedSampling<I> getAlgorithm(int sampleSize, IDataset<I> inputDataset, java.util.Random random)
ISamplingAlgorithmFactorygetAlgorithm in interface ISamplingAlgorithmFactory<I extends IInstance,StratifiedSampling<I extends IInstance>>sampleSize - Desired size of the sample that will be created.inputDataset - Dataset where the sample will be drawn from.random - Random object to make samples reproducible.