Deborah.Esther.BootstrapDerivedCalculator
Deborah.Esther.BootstrapDerivedCalculator.compute_bootstrap_derived! — Methodcompute_bootstrap_derived!(
bd::Dict,
LatVol::Int,
partition::DatasetPartitioner.DatasetPartitionInfo,
) -> NothingCompute bootstrap-averaged cumulants (condensate, susceptibility, skewness, kurtosis) for each subset directly from $Q$-moments ($Q_{n} \; (n=1,2,3,4)$), then construct post-cumulant bias-corrected combinations Y_P1, and Y_P2 from those cumulants.
This variant differs intentionally from the simpler overload that only maps $Q_n \; (n=1,2,3,4) \to \{ \Sigma , \chi , S , K \}$ for pre-defined labels. Here, bias correction is applied after cumulants are formed (i.e., on $\{ \Sigma , \chi , S , K \}$), not at the $Q$-moment level. This ordering is generally not recommended for production use, but is kept for completeness and for controlled comparisons.
Arguments
bd::Dict: A dictionary that must contain a:meantable of bootstrap-averaged moments and will be mutated to include cumulants and their derived combinations. The following keys must exist for each subset label in("Y_info", "Y_lb", "Y_bc", "Y_ul", "YP_bc", "YP_ul"):"Q1:<label>","Q2:<label>","Q3:<label>","Q4:<label>"
LatVol::Int: Lattice volume used to normalize condensate and susceptibility.partition::DatasetPartitioner.DatasetPartitionInfo: Partition metadata used to compute weights and training coverage:N_cnf: total configurationsN_lb: labeled configurationsN_ul: unlabeled configurationsN_tr: training configurations (subset of labeled)
- $w_{\texttt{lb}} = \dfrac{N_{\texttt{lb}}}{N_{\texttt{cnf}}}$
- $w_{\texttt{ul}} = \dfrac{N_{\texttt{ul}}}{N_{\texttt{cnf}}}$
Behavior
Per-subset cumulants. For each
label$\in$("Y_info","Y_lb","Y_bc","Y_ul","YP_bc","YP_ul"), read $Q_n \; (n=1,2,3,4)$ frombd[:mean]and computePost-cumulant bias combinations. For each
C$\in$("cond","susp","skew","kurt"), form:YmYP = (C:Y_bc) - (C:YP_bc)(bias estimate on the cumulant)Y_P1 = (N_tr == N_lb) ? (C:YP_ul) : (C:YP_ul + YmYP)(i.e., pass-through whenTRP= 100%, ignoringYmYP)Y_P2 = w_lb * (C:Y_lb) + w_ul * Y_P1
Results are stored under keys
"$C:YmYP","$C:Y_P1", and"$C:Y_P2".
Returns
Nothing. The function mutatesbd[:mean]in place, adding cumulant and derived-combination arrays for all supported labels.
Notes
- Ordering caveat. Bias correction here is applied after mapping $Q_{n} \; (n=1,2,3,4)$ to $\{ \Sigma , \chi , S , K \}$. In most workflows, applying bias handling earlier (at the $Q$-moment stage) is preferable to preserve the algebra of derived observables. Keep this function for record-keeping, audits, or
A/Bcomparisons. - TRP=100% shortcut. When
N_tr == N_lb, we setY_P1 = YP_ul(pass-through) and effectively ignoreYmYPforY_P1. This matches the intent that no bias-correction set is available/needed in that limit. - All vector operations are broadcasted element-wise; array shapes of inputs ($Q_{n} \; (n=1,2,3,4)$) must be consistent across labels.
Requirements
bd[:mean]must contain the required"Qk:<label>"keys for all listed labels.- The following functions must be defined and accept bootstrap-averaged inputs:
Deborah.Esther.SingleCumulant.calc_quark_condensate,Deborah.Esther.SingleCumulant.calc_susceptibility,Deborah.Esther.SingleCumulant.calc_skewness,Deborah.Esther.SingleCumulant.calc_kurtosis.
Example
bd = Dict(:mean => Dict(
"Q1:Y_lb"=>q1_lb, "Q2:Y_lb"=>q2_lb, "Q3:Y_lb"=>q3_lb, "Q4:Y_lb"=>q4_lb,
"Q1:Y_bc"=>q1_bc, "Q2:Y_bc"=>q2_bc, "Q3:Y_bc"=>q3_bc, "Q4:Y_bc"=>q4_bc,
"Q1:YP_bc"=>q1_ypbc, "Q2:YP_bc"=>q2_ypbc, "Q3:YP_bc"=>q3_ypbc, "Q4:YP_bc"=>q4_ypbc,
"Q1:YP_ul"=>q1_ypul, "Q2:YP_ul"=>q2_ypul, "Q3:YP_ul"=>q3_ypul, "Q4:YP_ul"=>q4_ypul,
"Q1:Y_ul"=>q1_ul, "Q2:Y_ul"=>q2_ul, "Q3:Y_ul"=>q3_ul, "Q4:Y_ul"=>q4_ul,
"Q1:Y_info"=>q1_info, "Q2:Y_info"=>q2_info, "Q3:Y_info"=>q3_info, "Q4:Y_info"=>q4_info,
))
compute_bootstrap_derived!(bd, LatVol, partition)
# bd[:mean] now includes "cond:<label>", "susp:<label>", "skew:<label>", "kurt:<label>",
# as well as post-cumulant "YmYP", "Y_P1", and "Y_P2" for each cumulant.Deborah.Esther.BootstrapDerivedCalculator.compute_bootstrap_derived! — Methodcompute_bootstrap_derived!(
bd::Dict,
LatVol::Int
) -> NothingCompute and store derived observables (condensate, susceptibility, skewness, kurtosis) from bootstrap-averaged quark moment data ($Q_{n} \; (n=1,2,3,4)$).
Arguments
bd::Dict: A dictionary containing:meankey, which maps to another dictionary that must include entries of the form"Qn:<label>"forn = 1to4and various<label>strings.LatVol::Int: Lattice volume, used to normalize condensate and susceptibility values.
Behavior
- For each label in the predefined list of observables (
"Y_info","YmYP", etc.), the function computes:"cond:<label>": chiral condensate using $Q_1$,"susp:<label>": susceptibility using $Q_1$ and $Q_2$,"skew:<label>": skewness using $Q_1$, $Q_2$, $Q_3$,"kurt:<label>": kurtosis using $Q1$, $Q_2$, $Q_3$, $Q_4$.
- The results are stored in-place under
bd[:mean].
Returns
Nothing: This function mutatesbdin-place.
Requirements
- The
bd[:mean]dictionary must contain all required moment keys for each target label. - The functions
Deborah.Esther.SingleCumulant.calc_quark_condensate,Deborah.Esther.SingleCumulant.calc_susceptibility,Deborah.Esther.SingleCumulant.calc_skewness, andDeborah.Esther.SingleCumulant.calc_kurtosismust be defined.