Skip to content

Refactor mmd_hypothesis_test Naming and Introduce User-Facing Wrapper Function #428

Open
@thegialeo

Description

@thegialeo

Following up on the discussion in PR #384, we identified several potential improvements around naming and functionality that should be addressed in a future (potentially breaking) PR.

Summary

  • The new functions introduced in PR Implement Feature for Issue #379: MMD Hypothesis Test #384, now named mmd_comparison and mmd_comparison_from_summaries, computes MMD values but does not perform a hypothesis test or produce plots.
  • The existing mmd_hypothesis_test function does perform a hypothesis test and generates plots, using MMD values such as those output by mmd_comparison and mmd_comparison_from_summaries.
  • The current naming may cause confusion, as mmd_hypothesis_test implies it only performs a test, while it also handles visualization.
  • A possible improvement would be to:
    • Rename mmd_hypothesis_test to something more specific (e.g., plot_xxx or similar).
    • Introduce a new user-facing function that ties everything together:
      • Computes MMD values (mmd_comparison, mmd_comparison_from_summaries)
      • Performs hypothesis testing
      • Generates visualizations
    • This new function could accept raw data, summaries, or precomputed MMD values for convenience.

Action Items

  • Consider a more descriptive name for the current mmd_hypothesis_test.
  • Introduce a new user-facing function that wraps:
    • mmd_comparison and mmd_comparison_from_summaries for MMD computation
    • mmd_hypothesis_test (or its renamed version) for hypothesis testing and plotting
  • Ensure the new function supports flexible input types (raw data, summaries, or precomputed MMD values).
  • Update documentation, examples, and tests accordingly.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions