Deborah.Rebekah.PXvsBSPlotter
Deborah.Rebekah.PXvsBSPlotter.plot_PX_BS_vs_labels — Methodplot_PX_BS_vs_labels(
key::String,
suffix_orig::String,
suffix1::String,
suffix2::String,
train_pct::Int,
new_dict::Dict{String, Array{Float64,2}},
labels_int::Vector{Int},
trains_ext_int::Vector{Int},
overall_name::String,
figs_dir::String;
key_tex::String = "",
save_file::Bool = false
) -> NothingPlot P1, P2, and original results versus labeled set percentage for a fixed training set size.
This function compares three estimation methods for a given observable key at a fixed training set percentage train_pct. It extracts the average values and error bars from new_dict using three suffixes:
suffix_orig: baseline (e.g.,"Y_BS")suffix1: first method (e.g.,"Y_P1")suffix2: second method (e.g.,"Y_P2")
All three curves are plotted against labels_int ($x$-axis), with distinct markers, colors, and error bars. The $y$-values are extracted for the corresponding column of train_pct in trains_ext_int.
Arguments
key::String: Observable name (e.g.,"TrM1","Deborah"). If"Deborah", the dict key omits prefix.suffix_orig::String: Suffix for the baseline method (e.g.,"Y_BS").suffix1::String: Suffix for the first estimation method (e.g.,"Y_P1").suffix2::String: Suffix for the second estimation method (e.g.,"Y_P2").train_pct::Int: Training set percentage to fix the column index for $y$-values.new_dict::Dict{String, Array{Float64,2}}: Dictionary containing precomputed average and error matrices.labels_int::Vector{Int}: Label set percentages ($x$-axis values).trains_ext_int::Vector{Int}: Training percentages (used to resolve column index).overall_name::String: Identifier string used in the saved filename.figs_dir::String: Output directory to save the figure.
Keyword Arguments
key_tex::String = "": $\LaTeX$ string for $y$-axis label.save_file::Bool = false: Whether to save the figure as PDF. Iftrue, attempts to crop usingpdfcrop.
Behavior
- $X$-axis:
labels_int, with slight left/right shifts forsuffix1andsuffix2for clarity. - $Y$-axis: Observable value with error bars.
- Marker shapes:
"s"(square) forsuffix_orig,"^"forsuffix1,"o"forsuffix2. - Raises an error if
train_pctnot found.
Deborah.Rebekah.PXvsBSPlotter.plot_PX_BS_vs_trains — Methodplot_PX_BS_vs_trains(
key::String,
suffix_orig::String,
suffix1::String,
suffix2::String,
label_pct::Int,
new_dict::Dict{String, Array{Float64,2}},
trains_ext_int::Vector{Int},
labels_int::Vector{Int},
overall_name::String,
figs_dir::String;
key_tex::String = "",
save_file::Bool = false
) -> NothingPlot P1, P2, and original results versus training percentage for a fixed label size.
This function compares three estimation methods for a given observable key at a fixed labeled set percentage label_pct. It extracts the average values and error bars from new_dict using three suffixes:
suffix_orig: baseline (e.g.,"Y_BS")suffix1: first method (e.g.,"Y_P1")suffix2: second method (e.g.,"Y_P2")
All three curves are plotted against trains_ext_int ($x$-axis), with distinct markers, colors, and error bars. The $y$-values are extracted for the corresponding row of label_pct in labels_int.
Arguments
key::String: Observable name (e.g.,"TrM1","Deborah"). If"Deborah", the dict key omits prefix.suffix_orig::String: Suffix for the baseline method (e.g.,"Y_BS").suffix1::String: Suffix for the first estimation method (e.g.,"Y_P1").suffix2::String: Suffix for the second estimation method (e.g.,"Y_P2").label_pct::Int: Label set percentage to fix the row index for $y$-values.new_dict::Dict{String, Array{Float64,2}}: Dictionary containing precomputed average and error matrices.trains_ext_int::Vector{Int}: Training set percentages ($x$-axis).labels_int::Vector{Int}: Label set percentages (used to resolve row index).overall_name::String: Identifier string used in the saved filename.figs_dir::String: Output directory to save the figure.
Keyword Arguments
key_tex::String = "": $\LaTeX$ string for $y$-axis label.save_file::Bool = false: Whether to save the figure as PDF. Iftrue, tries to crop it usingpdfcrop.
Behavior
- X-axis:
trains_ext_intwith left/right offsets for clarity. - Y-axis: Observable value with error bars.
- Marker shapes:
"s"(square) forsuffix_orig,"^"forsuffix1,"o"forsuffix2. - Raises an error if
label_pctnot found or if any $y$-values areNaN/Inf.
Side Effects
- Displays a
PyPlotfigure comparing all three methods. - If
save_file=true, saves a PDF underfigs_dir/plot_<key>_<overall_name>_LBP_<label_pct>.pdf. Ifpdfcropis available, the output is cropped automatically.