Deborah.Sarah.BootstrapDataInit
Deborah.Sarah.BootstrapDataInit.build_trace_data — Methodbuild_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 whichY_infois generated.N_cnf::Int: Number of configurations.N_src::Int: Number of source points per configuration.read_column_Y::Int: Index of the column inY_dfto 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 sizeN_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.
Deborah.Sarah.BootstrapDataInit.convert_matrix_to_vec_list — Methodconvert_matrix_to_vec_list(
mat::Matrix{T}
) -> Vector{Vector{T}} where T<:RealConvert 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 ofN_srcvectors, each of lengthN_conf
Deborah.Sarah.BootstrapDataInit.init_bootstrap_data — Methodinit_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
:meanmapping to another dictionary of label → zeroed vector of lengthN_bs.
Deborah.Sarah.BootstrapDataInit.init_bootstrap_data_cumulant — Methodinit_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
:meanmapping to another dictionary of label → zeroed vector of lengthN_bs. The labels are prefixed withtrM1-4:andQ1-4:for each observable group.