examples.separability.py¶

Separability Analysis using RINGS Framework

This script demonstrates how to: 1. Use the basic comparators (KS Test and Wilcoxon Test) 2. Apply the SeparabilityFunctor to compare multiple distributions 3. Visualize and interpret separability results

Usage (from root directory):

python -m examples.separability –comparator ks –alpha 0.01

For more options:

python -m examples.separability –help

Have your own performance distributions and want to execute a separability analysis? Replace the distribution in create_sample_distributions function with your own and run the script.

examples.separability.get_available_comparators()[source]¶

Return a list of available comparators with descriptions.

Returns:

Mapping from comparator name to description

Return type:

dict

examples.separability.create_comparator(name)[source]¶

Create a comparator based on the given name.

Parameters:

name (str) – Name of the comparator

Returns:

A comparator object that can compare distributions

Return type:

Comparator

examples.separability.create_sample_distributions(seed=42)[source]¶

Create sample distributions with different characteristics.

Parameters:

seed (int) – Random seed for reproducibility

Returns:

Dictionary of named distributions

Return type:

dict

examples.separability.basic_comparator_example(seed=42)[source]¶

Run a basic example using comparators directly.

Parameters:

seed (int) – Random seed for reproducibility

examples.separability.run_separability_analysis(comparator_name, alpha, n_permutations, n_jobs, seed)[source]¶

Run the separability analysis using the specified comparator.

Parameters:
  • comparator_name (str) – Name of the comparator to use

  • alpha (float) – Significance level for statistical tests

  • n_permutations (int) – Number of permutations for the test

  • n_jobs (int) – Number of parallel jobs

  • seed (int) – Random seed for reproducibility

Returns:

(results_df, results_list) containing the analysis results

Return type:

tuple

examples.separability.print_results_summary(results_df, results_list, comparator_name)[source]¶

Print a summary of the results.

Parameters:
  • results_df – Results as DataFrame

  • results_list – Results as list of dictionaries

  • comparator_name (str) – Name of the comparator used

examples.separability.main()[source]¶

Main function to run the separability analysis. User inputs are handled via command line arguments:

–comparator: Name of the comparator to use (default: ks) –alpha: Significance level for statistical tests (default: 0.01) –seed: Random seed for reproducibility (default: 42) –permutations: Number of permutations for the test (default: 1000) –n-jobs: Number of parallel jobs (-1 for all cores, default: 1) –skip-basic: Include –skip-basic argument to skip basic example, otherwise included by default