BinningAnalysis.ErrorPropagatorMethod
ErrorPropagator(zero_element::T...[; capacity::Int])

Creates a new ErrorPropagator which can take (at least) capacity many values for each input of type T. The type and the size are inherited from the given zero_elements, which must exclusively contain zeros.

Values can be added using push! and append!.


ErrorPropagator(timeseries::AbstractVector{T}...)

Creates a new ErrorPropagator and adds all elements from each given timeseries.

BinningAnalysis.ErrorPropagatorMethod
ErrorPropagator([::Type{T}; N_args, capacity::Int])

Creates an ErrorPropagator which can handle (at least) capacity many values for each of N_args inputs of type T.

The default is T = Float64, N_args = 2 and capacity = 2^32-1 ≈ 4e9.

BinningAnalysis.FastVarianceType
FastVariance <: AbstractVarianceAccumulator

The FastVariance accumulator keeps track of ∑x and ∑x² where x refers to the pushed values. It is significantly faster than the Variance accumulator, but can become unstable for some inputs. (For example when the mean is much large than the variance of the pushed values.)

See also: AbstractVarianceAccumulator, Variance

BinningAnalysis.IncrementBinnerMethod
IncrementBinner([::Type{T}; blocksize = 64])
IncrementBinner(zero_element::T[; blocksize = 64])

Creates an IncrementBinner from a zero_element numeric type T.

Values pushed to an IncrementBinner are averaged in stages. For the first blocksize values pushed no averaging happens. After that 2blocksize elements are averaged 2 at a time, then 4blocksize element 4 at a time, etc. This means values pushed become progressively more compressed and smoothed.

BinningAnalysis.LogBinnerMethod
LogBinner(zero_element::T[; capacity::Int])

Creates a new LogBinner which can take (at least) capacity many values of type T. The type and the size are inherited from the given zero_element, which must exclusively contain zeros.

Values can be added using push! and append!.


LogBinner(timeseries::AbstractVector{T})

Creates a new LogBinner and adds all elements from the given timeseries.

BinningAnalysis.LogBinnerMethod
LogBinner(B::LogBinner[; capacity::Int])

Creates a new LogBinner from an existing LogBinner, copying the data inside. The new LogBinner may be larger or smaller than the given one.

BinningAnalysis.LogBinnerMethod
LogBinner(compressors, x_sum, x2_sum, count)

Creates a new (equivalent) LogBinner from the fields of < v0.5 LogBinner.

BinningAnalysis.LogBinnerMethod
LogBinner([::Type{T}; capacity::Int])

Creates a LogBinner which can handle (at least) capacity many values of type T.

The default is T = Float64 and capacity = 2^32-1 ≈ 4e9.

Base.append!Method
append!(B::AbstractBinner, values::AbstractArray)

Adds an array of values to the binner.

Base.append!Method
append!(ErrorPropagator, values...)

Adds multiple arrays of values to the Error Propagator by push!ing each element.

Base.empty!Method
empty!(V::AbstractVarianceAccumulator)

Clear the given variance accumulator.

Base.empty!Method
empty!(ep::ErrorPropagator)

Clear the error propagator, i.e. reset it to its inital state.

Base.empty!Method
empty!(B::LogBinner)

Clear the binner, i.e. reset it to its inital state.

Base.isemptyMethod
isempty(V::AbstractVarianceAccumulator)

Returns true if the given variance accumulator is empty.

Base.push!Method
push!(ep::ErrorPropagator, args...)

Pushes a set of argumentes args into a given error propagator. Note that the number of arguments must match the initially defined N_arguments of the error propagator.

Base.push!Method
push!(B::LogBinner, value)

Pushes a new value into the Binning Analysis.

Base.push!Method
push!(V::AbstractVarianceAccumulator{T}, value::T)

Pushes a new value into the variance accumulator.

BinningAnalysis.all_meansMethod
all_means(B::AbstractBinner)

Calculates the mean for each binning level of a given binner.

BinningAnalysis.all_tausMethod
all_taus(B::AbstractBinner)

Calculates the autocorrelation time tau for each binning level of a given binner.

BinningAnalysis.all_varNsMethod
all_varNs(B::AbstractBinner)

Calculates the variance/N for each binning level of a given binner.

BinningAnalysis.all_varsMethod
all_vars(B::AbstractBinner)

Calculates the variance for each binning level of a given binner.

BinningAnalysis.autocorrelationFunction
autocorrelation(B::AbstractBinner[, lvl])

Calculates the autocorrelation time tau for a given binner relative to an optional binning level. The default binning level is picked such that at least 32 bins exist.

BinningAnalysis.autocorrelation_timeFunction
autocorrelation_time(B::AbstractBinner[, lvl])

Calculates the autocorrelation time tau for a given binner relative to an optional binning level. The default binning level is picked such that at least 32 bins exist.

BinningAnalysis.capacityMethod
capacity(ep)

Capacity of the error propagator, i.e. how many values can be handled before overflowing.

BinningAnalysis.capacityMethod
capacity(B)

Capacity of the binner, i.e. how many values can be handled before overflowing.

BinningAnalysis.convergenceMethod
convergence(B::LogBinner, lvl)

Computes the difference between the variance of this lvl and the last, normalized to the last lvl. If this value tends to 0, the Binning Analysis has converged.

BinningAnalysis.covmatMethod
covmat(B::ErrorPropagator[, lvl])

Returns the covariance matrix for a given level of the error propgator.

BinningAnalysis.has_convergedFunction
has_converged(B::LogBinner, lvl[, threshhold = 0.05])

Returns true if the Binning Analysis has converged for a given lvl.

BinningAnalysis.meansFunction
means(B::ErrorPropagator[, lvl])

Calculates the mean for each argument of the error propagator at a given binning level.

BinningAnalysis.std_errorFunction
std_error(B::ErrorPropagator, gradient[, lvl])

Gives the first-order standard error estimate of a function f acting on the arguments of the error propagator. gradient is either the gradient of f (a function) or a vector ∇f(means(B)). To get an estimate mean value of f, mean(B, f) can be used.

BinningAnalysis.std_errorFunction
std_error(B::ErrorPropagator, i[, lvl])

Calculates the standard error of the mean for the i-th argument of the error propagator at a given binning level.

BinningAnalysis.std_errorMethod
std_error(x[; method])

Estimate the standard error of the mean of the given time series.

The keyword method can be used to choose one out of the following methods:

  • Logarithmic binning: :log (default)
  • Full binning: :full
  • Jackknife resampling: :jackknife
BinningAnalysis.std_errorsFunction
std_errors(B::ErrorPropagator[, lvl])

Calculates the standard error of the mean for each argument of the error propagator at a given binning level.

BinningAnalysis.tauFunction
tau(B::ErrorPropagator, i[, lvl])

Calculates the autocorrelation time tau for the i-th argument of the error propagator at a given binning level.

BinningAnalysis.tauFunction
tau(B::LogBinner[, lvl])

Calculates the autocorrelation time tau for a given binner relative to an optional binning level. The default binning level is picked such that at least 32 bins exist.

BinningAnalysis.tauMethod
tau(x[; method])

Estimate the autocorrelation time of the given time series.

The keyword method can be used to choose one out of the following methods:

  • Logarithmic binning: :log (default)
  • Full binning: :full
BinningAnalysis.unbinned_tauMethod
unbinned_tau(sample[; truncate = true, max_rel_err = 0.0, min_sample_size = 32])

Estimates the autocorrelation time τ = ∑ₖ (1 - k/N) χₖ/χ₀ from a sample using the correlation function χₖ = ⟨xᵢ xᵢ₊ₖ⟩ - ⟨xᵢ⟩⟨xᵢ₊ₖ⟩ where x are values in the sample.

Note that by default this function truncated the sum over k if v / τ < max_rel_err / (N - k) or if the k > N - min_sample_size. The former cuts of fluctuations around 0 and can be turned of with truncate = false.

BinningAnalysis.varNFunction
varN(B::LogBinner[, lvl])

Calculates the variance/N of a given level in the Binning Analysis.

BinningAnalysis.varNFunction
varN(B::ErrorPropagator, gradient[, lvl])

Gives the first-order variance/N estimate of a function `f` acting on the
arguments of the error propagator. `gradient` is either the gradient of `f` (a
function) or a vector `∇f(means(B))`. To get an estimate mean value of `f`,
`mean(B, f)` can be used.
BinningAnalysis.varNFunction
varN(B::LogBinner[, lvl])

Calculates the variance/N of a given level in the Binning Analysis.

BinningAnalysis.varNFunction
varN(B::ErrorPropagator, i[, lvl])

Calculates the variance/N for the i-th argument of the error propagator at a given binning level.

BinningAnalysis.varNMethod
varN(V::AbstractVarianceAccumulator)

Calculates the variance/N of a given variance accumulator.

BinningAnalysis.varNsFunction
varNs(B::ErrorPropagator[, lvl])

Calculates the variance/N for each argument of the error propagator at a given binning level.

BinningAnalysis.varsFunction
vars(B::ErrorPropagator[, lvl])

Calculates the variance for each argument of the error propagator at a given binning level.

Statistics.meanFunction
mean(B::LogBinner[, lvl])

Calculates the mean for a given level in the Binning Analysis.

Statistics.meanFunction
mean(B, f[, lvl=1])

Returns an estimate for the mean value of f, where f is a function acting on the sample pushed the error porpagator. f must be of the form f(v), where v = [mean_arg1, mean_arg2, ..., mean_argN] is a vector containing the averages of each argument pushed to the error propagator.

Statistics.meanFunction
mean(B::LogBinner[, lvl])

Calculates the mean for a given level in the Binning Analysis.

Statistics.meanFunction
mean(B::ErrorPropagator, i[, lvl = 1])

Calculates the mean for the i-th argument of the error propagator at an optional binning level.

Statistics.meanMethod
mean(V::AbstractVarianceAccumulator)

Calculates the mean of a given variance accumulator.

Statistics.varFunction
var(B::ErrorPropagator, i[, lvl])

Calculates the variance for the i-th argument of the error propagator at a given binning level.

Statistics.varFunction
var(B::LogBinner[, lvl])

Calculates the variance of a given level in the Binning Analysis.

Statistics.varFunction
var(B::LogBinner[, lvl])

Calculates the variance of a given level in the Binning Analysis.

Statistics.varMethod
var(V::AbstractVarianceAccumulator)

Calculates the variance of a given variance accumulator.

Statistics.varMethod
var(B::ErrorPropagator, gradient[, lvl])

Gives the first-order variance estimate of a function f acting on the arguments of the error propagator. gradient is either the gradient of f (a function) or a vector ∇f(means(B)). To get an estimate mean value of f, mean(B, f) can be used.

BinningAnalysis.JackknifeModule

Jackknife errors for (non-linear) functions of uncertain data, i.e. g(<a>, <b>, ...) where <a>, <b> are the means of data sets a and b. Use jackknife_full(g, a, b, ...) to get the jackknife estimate, bias and error or jackknife(g, a, b, ...) to get just the estimate and error.

See: jackknife_full, jackknife

BinningAnalysis.Jackknife.biasMethod
bias(g::Function, a[, b, ...])

Returns the jackknife bias for a given function g(<a>, <b>, ...) acting on the means of the samples a, b, etc.

BinningAnalysis.Jackknife.estimateMethod
estimate(g::Function, a[, b, ...])

Returns the (bias corrected) jackknife estimate for a given function g(<a>, <b>, ...) acting on the means of the samples a, b, etc. If leaveoneout has already been calculated it can be supplied via the keyword argument reduced_results.

BinningAnalysis.Jackknife.jackknifeMethod
jackknife(g::Function, a[, b, ...])

Returns the jackknife estimate and error for a given function g(<a>, <b>, ...) acting on the means of the samples a, b, etc.

Example: # Assuming some sample xs is given # variance of sample xs g(x2, x) = x2 - x^2 error = jackknife(g, xs.^2, xs)

See also: estimate, std_error

BinningAnalysis.Jackknife.jackknife_fullMethod
jackknife_full(g::Function, a[, b, ...])

Returns the jackknife estimate, bias and error for a given function g(<a>, <b>, ...) acting on the means of the samples a, b, etc.

Example: # Assuming some sample xs is given # variance of sample xs g(x2, x) = x2 - x^2 estimate, bias, error = jackknife_full(g, xs.^2, xs)

See also: estimate, bias, std_error

BinningAnalysis.Jackknife.leaveoneoutMethod
leaveoneout(g::Function, samples::AbstractVector{<:Number}...)

Generates N sub-samples for each sample in samples, where one value is left out and applies it mean to the function g. The result is used for a 1-jackknife.

BinningAnalysis.Jackknife.std_errorMethod
std_error(g::Function, a[, b, ...])

Returns the jackknife error for a given function g(<a>, <b>, ...) acting on the means of the samples a, b, etc.

Statistics.varMethod
var(g::Function, a[, b, ...])

Returns the jackknife variance for a given function g(<a>, <b>, ...) acting on the means of the samples a, b, etc.