peal.sparse_dictionaries.utils¶
Plotting helpers for evaluating sparse dictionaries against known attributes.
Used by the SAE / MSAE evaluation scripts to visualise how strongly each learned component correlates with ground-truth attributes (e.g. CelebA labels) and how much variance of the underlying activations the leading components explain. The commented-out block at the end is an earlier version kept for reference.
Functions
Plots a correlation heatmap (Top) and a Full Cumulative Explained Variance plot (Bottom). |
|
Read c_min_and_maxes.txt and return (c_mins, c_maxs) for the selected columns. |
|
Return (W, selected): the dictionary columns the counterfactual attempts steer along. |