Class Sampling


  • public final class Sampling
    extends Object
    Utilities for statistical evaluation of computational experiments.
    • 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 from
        random - the random number generator
        Returns:
        a sampled dataset