dual_histogram_with_errorbars_df#
Plot main model and baseline histograms with mean frequencies and standard error bars, using a pandas DataFrame in long format.
π₯ Arguments#
Name |
Type |
Required |
Description |
|---|---|---|---|
data_df |
pd.DataFrame |
β |
Long-form DataFrame containing one row per sample with columns for the dataset label, seed, and score. |
label_key |
str |
β |
Column name in data_df that identifies the dataset (main or baseline). |
seed_key |
str |
β |
Column name identifying the random seed for each sample. |
score_key |
str |
β |
Column name containing the score values. |
main_label |
str |
β |
Value in label_key that denotes the main model. If not provided, first label is used. |
baseline_labels |
List[str] |
β |
List of baseline labels; default is all labels except main_label. |
baseline_colors |
List[str] |
β |
Colors for each baseline label. Default palette is used. |
main_color |
str |
β |
Color for the main model. Default: β#4C72B0β. |
num_bins |
int |
β |
Number of histogram bins. Default: 50. |
xlabel |
str |
β |
Label for the x-axis. Default: βScoreβ. |
ylabel |
str |
β |
Label for the y-axis. Default: βAverage Frequencyβ. |
title |
str |
β |
Plot title. Default: None. |
figsize |
tuple |
β |
Figure size. Default: (8, 5). |
save |
str |
β |
Base path to save PNG and PDF if provided. |
fontsize |
float |
β |
Base font size for annotations, ticks, labels, title, and legend. |
π¦ Example Output#
Click to show example code
# Example code for |dual_histogram_with_errorbars_df| not found.