Deborah.Sarah.BootstrapDataInit

Deborah.Sarah.BootstrapDataInit.build_trace_dataMethod
build_trace_data(
    Y_mats::Dict{Symbol, Matrix{Float64}}, 
    Y_df::Matrix{Float64}, 
    N_cnf::Int, 
    N_src::Int, 
    read_column_Y::Int
) -> Dict{String, Vector{Vector{Float64}}}

Constructs trace data vectors from raw measurement matrices and metadata.

Arguments

  • Y_mats::Dict{Symbol, Matrix{Float64}}: Dictionary with keys like :Y_lb, :Y_bc, :Y_ul, :YP_bc, :YP_ul, each mapped to a (N_bs $\times$ N_cnf) matrix of measurements.
  • Y_df::Matrix{Float64}: Raw metadata matrix from which Y_info is generated.
  • N_cnf::Int: Number of configurations.
  • N_src::Int: Number of source points per configuration.
  • read_column_Y::Int: Index of the column in Y_df to extract as label information.

Returns

  • Dict{String, Vector{Vector{Float64}}}: Dictionary where each key (e.g., "Y_bc") maps to a list of vectors of size N_bs, one per configuration. Includes an additional key "Y_info" for label metadata.

Notes

Each Y_mats[label] is converted using convert_matrix_to_vec_list, which splits the (N_bs $\times$ N_cnf) matrix into a vector of length N_cnf, each holding a bootstrap vector of size N_bs.

source
Deborah.Sarah.BootstrapDataInit.convert_matrix_to_vec_listMethod
convert_matrix_to_vec_list(
    mat::Matrix{T}
) -> Vector{Vector{T}} where T<:Real

Convert a matrix of shape (N_conf, N_src) to a list of vectors per source.

Each vector in the output corresponds to a source.

Arguments

  • mat: Matrix{Float64} of shape (N_conf, N_src)

Returns

  • Vector{Vector{Float64}}: list of N_src vectors, each of length N_conf
source
Deborah.Sarah.BootstrapDataInit.init_bootstrap_dataMethod
init_bootstrap_data(
    N_bs::Int, 
    ::Type{T}
) where T<:Real -> Dict{Symbol, Any}

Initialize a dictionary for bootstrap data with preallocated :mean field.

Arguments

  • N_bs::Int: Number of bootstrap samples.
  • T<:Real: Numeric type for stored values (e.g., Float64).

Returns

  • A dictionary with key :mean mapping to another dictionary of label → zeroed vector of length N_bs.
source
Deborah.Sarah.BootstrapDataInit.init_bootstrap_data_cumulantMethod
init_bootstrap_data_cumulant(
    N_bs::Int
) -> Dict{Symbol, Any}

Initialize a dictionary for cumulant-style bootstrap data with :mean field preallocated for all $\text{Tr} \, M^{-n} \; (n=1,2,3,4)$ and $Q$-moment variants.

Arguments

  • N_bs::Int: Number of bootstrap resamples.

Returns

  • A dictionary with key :mean mapping to another dictionary of label → zeroed vector of length N_bs. The labels are prefixed with trM1-4: and Q1-4: for each observable group.
source