Creates a bar chart showing how often each feature appears across Pareto-optimal solutions, highlighting highly stable features.

plot_feature_stability(
  stability_result,
  top_n = 20L,
  highlight_threshold = 0.5,
  bar_color = "#377EB8",
  highlight_color = "#E41A1C"
)

Arguments

stability_result

Output from analyze_feature_stability().

top_n

Integer; maximum number of features to display. Defaults to 20.

highlight_threshold

Numeric in [0, 1]; features appearing in more than this proportion of solutions are highlighted. Defaults to 0.5.

bar_color

Color for bars below the threshold. Defaults to "#377EB8".

highlight_color

Color for bars at or above the threshold. Defaults to "#E41A1C".

Value

A ggplot object.

Examples

# stability <- analyze_feature_stability(panel_result)
# plot_feature_stability(stability)
# plot_feature_stability(stability, top_n = 10, highlight_threshold = 0.7)