R/pareto_feature_stability.R
analyze_feature_stability.RdComputes feature inclusion frequencies and pairwise Jaccard similarity
between all Pareto-optimal solutions. Accepts either an
OptimizationResult (preferred — contains all Pareto solutions) or a
BiomarkerPanelResult (legacy path).
analyze_feature_stability(
result,
feature_type = c("features", "base_features")
)An OptimizationResult or BiomarkerPanelResult.
One of "features" (default) or "base_features".
When "base_features", counts original gene names rather than transformed
feature names (e.g. pairwise ratios). Only supported for
OptimizationResult input.
A list with class "FeatureStabilityResult" containing:
Data frame with columns feature, count, proportion
ordered by descending count.
Symmetric matrix of pairwise Jaccard similarity
coefficients between solutions. Row/column names are solution_id values.
Integer count of Pareto-optimal solutions analyzed.
Mean pairwise Jaccard similarity (excluding diagonal).
if (FALSE) { # \dontrun{
# From an OptimizationResult (preferred):
stability <- analyze_feature_stability(opt_result)
stability$frequencies
plot_feature_stability(stability)
# Gene-level frequencies with pairwise transforms:
stability_genes <- analyze_feature_stability(opt_result,
feature_type = "base_features")
} # }