Class GroupResampler

    • Constructor Detail

      • GroupResampler

        public GroupResampler​(Matrix sample,
                              Resampler resampler)
        Constructs a re-sampler that treats each row as a group object, shuffling the groups/rows.
        Parameters:
        sample - a multivariate sample
        resampler - a univariate re-sampler to shuffle the row indices, from 1 to sample length
      • GroupResampler

        public GroupResampler​(Matrix sample)
        Constructs a re-sampler that treats each row as a group object, shuffling the groups/rows.
        Parameters:
        sample - a multivariate sample
    • Method Detail

      • seed

        public void seed​(long... seeds)
        Description copied from interface: Seedable
        Seed the random number/vector/scenario generator to produce repeatable experiments.
        Specified by:
        seed in interface Seedable
        Parameters:
        seeds - the seeds
      • newResample

        public Matrix newResample()
        Description copied from interface: MultivariateResampler
        Gets a resample from the original sample.

        It is very important this method is thread-safe so resampling can be run in parallel.

        Specified by:
        newResample in interface MultivariateResampler
        Returns:
        a resample, e.g., a bootstrap sample