|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.tools.math.sampling.OrderedSamplingWithoutReplacement
public class OrderedSamplingWithoutReplacement
Implements iterative, linear sampling without replacement. The size of the population and the size or fraction of the sample have to be given as parameters. The algorithm is based upon A.F. Bissell (1986): Ordered Random Selection Without Replacement. In: Applied Statistics, 35 (1), pp. 73-75.
| Constructor Summary | |
|---|---|
OrderedSamplingWithoutReplacement(RandomGenerator randomGenerator,
int populationSize,
double sampleRatio)
Constructor for a relative fraction of elements. |
|
OrderedSamplingWithoutReplacement(RandomGenerator randomGenerator,
int populationSize,
int sampleSize)
Constructor for an absolute number of elements. |
|
| Method Summary | |
|---|---|
boolean |
acceptElement()
Include element in the sample. |
static int[] |
getSampledIndices(RandomGenerator randomGenerator,
int populationSize,
int sampleSize)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OrderedSamplingWithoutReplacement(RandomGenerator randomGenerator,
int populationSize,
int sampleSize)
randomGenerator - A RandomGenerator.populationSize - The size of the population.sampleSize - The size of the sample.
public OrderedSamplingWithoutReplacement(RandomGenerator randomGenerator,
int populationSize,
double sampleRatio)
randomGenerator - A RandomGenerator.populationSize - The size of the sample relative to the population size.sampleRatio - The ratio of the sample.| Method Detail |
|---|
public static int[] getSampledIndices(RandomGenerator randomGenerator,
int populationSize,
int sampleSize)
public boolean acceptElement()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||