Deborah.Rebekah.Heatmaps
Deborah.Rebekah.Heatmaps.render_bhattacharyya_heatmap — Methodrender_bhattacharyya_heatmap(
bc_arr::Array{Float64,2},
N_lb_arr::Vector{Int},
N_tr_arr::Vector{Int},
key::Symbol,
pred_tag::Symbol,
overall_name::String,
figs_dir::String;
key_tex::String = "",
save_file::Bool = false,
annotate::Bool = true,
cmap_name::String = "viridis",
levels::Vector{Float64} = [0.6, 0.8, 0.9],
draw_contours::Bool = true
) -> NothingRender a single heatmap for the Bhattacharyya coefficient ($\mathrm{BC}$ in $[0,1]$).
- Colormap spans
0.0(worst) to1.0(best). - Optional numeric annotations per cell.
- Optional contour lines at given
levelsfor quick visual thresholds.
Arguments
bc_arr: 2D array of Bhattacharyya coefficients in $[0,1]$.N_lb_arr: $y$-axis tick labels (LBP$\%$).N_tr_arr: $x$-axis tick labels (TRP$\%$).key: Observable symbol (e.g.,:TrM1).pred_tag: Prediction method symbol (e.g.,:Y_P2).overall_name: Identifier used in filename.figs_dir: Output directory.
Keywords
key_tex="": $\LaTeX$ label (e.g., $\chi$).save_file=false: If true, saves a cropped PDF infigs_dir.annotate=true: If true, prints $\mathrm{BC}$ values in each cell.cmap_name="viridis":Matplotlibcolormap name.levels=[0.6,0.8,0.9]: Contour levels for $\mathrm{BC}$.draw_contours=true: Whether to draw contour overlays.
Side Effects
- Displays the heatmap; optionally writes
<figs_dir>/heatmap_bc_<key>_<pred_tag>_<overall_name>.pdf.
Deborah.Rebekah.Heatmaps.render_jsd_heatmap — Methodrender_jsd_heatmap(
jsd_arr::Array{Float64,2},
N_lb_arr::Vector{Int},
N_tr_arr::Vector{Int},
key::Symbol,
pred_tag::Symbol,
overall_name::String,
figs_dir::String;
key_tex::String = "",
save_file::Bool = false,
annotate::Bool = true,
cmap_name::String = "viridis",
levels::Vector{Float64} = [0.2, 0.4, 0.6, 0.8],
draw_contours::Bool = true
) -> NothingRender a single heatmap for the Jensen-Shannon divergence ($\mathrm{JSD}$ in $[0,1]$, base-2).
- Lower is better (
0= identical,1= worst). - Optional per-cell annotations and contour overlays.
Arguments
jsd_arr: 2D array of $\mathrm{JSD}$ values in $[0,1]$.N_lb_arr: $y$-axis tick labels (LBP$\%$).N_tr_arr: $x$-axis tick labels (TRP$\%$).key: Observable symbol (e.g.,:TrM1).pred_tag: Prediction method symbol (e.g.,:Y_P1).overall_name: Identifier used in filename.figs_dir: Output directory.
Keywords
key_tex="": $\LaTeX$ label (e.g., $\chi$).save_file=false: If true, saves a cropped PDF infigs_dir.annotate=true: If true, prints $\mathrm{JSD}$ values in each cell.cmap_name="viridis":Matplotlibcolormap name.levels=[0.2,0.4,0.6,0.8]: Contour levels for $\mathrm{JSD}$.draw_contours=true: Whether to draw contour overlays.
Side Effects
- Displays the heatmap; optionally writes
<figs_dir>/heatmap_jsd_<key>_<pred_tag>_<overall_name>.pdf.
Deborah.Rebekah.Heatmaps.render_overlap_and_error_heatmaps — Methodrender_overlap_and_error_heatmaps(
chk_arr::Array{Int, 2},
err_arr::Array{Float64, 2},
N_lb_arr::Vector{Int},
N_tr_arr::Vector{Int},
key::Symbol,
pred_tag::Symbol,
overall_name::String,
figs_dir::String;
key_tex::String = "",
save_file::Bool = false
) -> NothingRender side-by-side heatmaps showing overlap (CHK) and error ratio (ERR) matrices for a given observable and prediction method.
This function generates a two-panel static figure using PyPlot.jl:
- Left panel (
CHK): overlap matrix with categorical values (0= black,1= gray,2= white). - Right panel (
ERR): error ratio matrix, colormapped from1.0to7.0. If any values fall outside this range, the out-of-range values are shown as overlaid text.
Axis ticks are labeled using N_tr_arr ($x$-axis) and N_lb_arr ($y$-axis), with $\LaTeX$-rendered labels using key_tex. Title includes the observable and method tag.
Arguments
chk_arr::Array{Int,2}: Overlap matrix (each entry0,1, or2).err_arr::Array{Float64,2}: Error ratio matrix.N_lb_arr::Vector{Int}: Labeled set percentage values for $y$-axis ticks.N_tr_arr::Vector{Int}: Training set percentage values for $x$-axis ticks.key::Symbol: Observable identifier (e.g.,:TrM1,:TrM4).pred_tag::Symbol: Prediction method (e.g.,:Y_P1,:Y_P2).overall_name::String: Identifier used in the output filename.figs_dir::String: Directory path to save the resulting figure.
Keyword Arguments
key_tex::String="": $\LaTeX$-formatted string for $y$-axis label (e.g., $\mathcal{R}_{\mathrm{LB}}$).save_file::Bool=false: Whether to save the figure as a PDF file underfigs_dir.
Side Effects
- Displays the generated heatmap figure using
PyPlot.jl. - If
save_file=true, saves a PDF under the filename:figs_dir/heatmap_kurt_<overall_name>.pdf.