Skip to content

Correlation section — top-5 Pearson + Spearman per column, Target Analysis, Sentinels #273

Description

@DEVunderdog

Parent

#268

What to build

Replace the full N×N correlation matrices in to_markdown() with compact top-5 views, and add the Target Analysis and Sentinels sections. For feature correlations: within each flagged column's detail section, show the top-5 highest absolute Pearson correlations and top-5 highest absolute Spearman correlations (column name + value, sorted descending by absolute value). Add a ## Target Analysis section showing, for each declared target column, the top-5 absolute Pearson and top-5 absolute Spearman correlations per feature column. Add a ## Sentinels section rendering numeric_sentinels and string_sentinels unchanged.

Acceptance criteria

  • Feature correlation entries in a column detail section contain at most 5 Pearson and 5 Spearman entries, sorted by descending absolute value
  • The full N×N Pearson and Spearman matrices do not appear anywhere in to_markdown() output
  • ## Target Analysis section appears when result.dataset.target_correlations is non-empty, showing top-5 Pearson + top-5 Spearman per feature per target
  • ## Sentinels section renders numeric_sentinels and string_sentinels from the result
  • Unit tests cover: result with 10-column correlation matrix (assert ≤ 5 entries appear per column); result with target correlations (assert top-5 ranking is correct); result with sentinels (assert both dicts appear)
  • to_markdown() is now complete per ADR-0040 — the full compact contract is satisfied

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions