Class GroupResampler
java.lang.Object
dev.nm.stat.random.sampler.resampler.multivariate.GroupResampler
- All Implemented Interfaces:
MultivariateResampler
,Seedable
-
Constructor Summary
ConstructorsConstructorDescriptionGroupResampler
(Matrix sample) Constructs a re-sampler that treats each row as a group object, shuffling the groups/rows.GroupResampler
(Matrix sample, Resampler resampler) Constructs a re-sampler that treats each row as a group object, shuffling the groups/rows. -
Method Summary
Modifier and TypeMethodDescriptionGets a resample from the original sample.void
seed
(long... seeds) Seed the random number/vector/scenario generator to produce repeatable experiments.
-
Constructor Details
-
GroupResampler
Constructs a re-sampler that treats each row as a group object, shuffling the groups/rows.- Parameters:
sample
- a multivariate sampleresampler
- a univariate re-sampler to shuffle the row indices, from 1 to sample length
-
GroupResampler
Constructs a re-sampler that treats each row as a group object, shuffling the groups/rows.- Parameters:
sample
- a multivariate sample
-
-
Method Details
-
seed
public void seed(long... seeds) Description copied from interface:Seedable
Seed the random number/vector/scenario generator to produce repeatable experiments. -
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 interfaceMultivariateResampler
- Returns:
- a resample, e.g., a bootstrap sample
-