Class BootstrapEstimator


  • public class BootstrapEstimator
    extends Object
    This class estimates the statistic of a sample using a bootstrap method.
    • Constructor Detail

      • BootstrapEstimator

        public BootstrapEstimator​(Resampler bootstrap,
                                  StatisticFactory factory,
                                  int B)
        Constructs a bootstrap estimator.
        Parameters:
        bootstrap - the bootstrap method and the sample
        factory - the statistic
        B - 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 sample
        factory - the statistic; It is very important this class is thread-safe so resampling can be run in parallel.
        B - the number of bootstrap replicas
        isParallel - true if to run in parallel cores
    • Method Detail

      • value

        public double value()
        Gets the estimator value (the mean).
        Returns:
        the estimator value
      • variance

        public double variance()
        Gets the estimator variance, of which the convergence limit is decided by sample size, not B.
        Returns:
        the estimator variance