Package org.nlpub.watset.eval
Class Sampling
- java.lang.Object
-
- org.nlpub.watset.eval.Sampling
-
public final class Sampling extends Object
Utilities for statistical evaluation of computational experiments.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> List<T>sample(T[] dataset, Random random)Creates a bootstrapped dataset using sampling with replacement from the given dataset.
-
-
-
Method Detail
-
sample
public static <T> List<T> sample(T[] dataset, Random random)
Creates a bootstrapped dataset using sampling with replacement from the given dataset.The dataset can be obtained using
Collection.toArray(Object[]).- Type Parameters:
T- the type of dataset elements- Parameters:
dataset- the dataset to sample fromrandom- the random number generator- Returns:
- a sampled dataset
-
-