Class BootstrapEstimator
- java.lang.Object
-
- dev.nm.stat.random.sampler.resampler.BootstrapEstimator
-
public class BootstrapEstimator extends Object
This class estimates the statistic of a sample using a bootstrap method.
-
-
Constructor Summary
Constructors Constructor Description BootstrapEstimator(Resampler bootstrap, StatisticFactory factory, int B)
Constructs a bootstrap estimator.BootstrapEstimator(Resampler bootstrap, StatisticFactory factory, int B, boolean isParallel)
Constructs a bootstrap estimator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
value()
Gets the estimator value (the mean).double
variance()
Gets the estimator variance, of which the convergence limit is decided by sample size, notB
.
-
-
-
Constructor Detail
-
BootstrapEstimator
public BootstrapEstimator(Resampler bootstrap, StatisticFactory factory, int B)
Constructs a bootstrap estimator.- Parameters:
bootstrap
- the bootstrap method and the samplefactory
- the statisticB
- the number of bootstrap replicas
-
BootstrapEstimator
public BootstrapEstimator(Resampler bootstrap, StatisticFactory factory, int B, boolean isParallel)
Constructs a bootstrap estimator.- Parameters:
bootstrap
- the bootstrap method and the samplefactory
- the statistic; It is very important this class is thread-safe so resampling can be run in parallel.B
- the number of bootstrap replicasisParallel
-true
if to run in parallel cores
-
-