att.viz

Visualization utilities for ATT.

att.viz.plot_persistence_diagram(diagrams, ax=None, colormap='viridis')[source]

Plot persistence diagrams for all homology dimensions.

Parameters:
Return type:

Figure

att.viz.plot_persistence_image(images, ax=None, colormap='hot')[source]

Plot persistence images for all homology dimensions.

Parameters:
Return type:

Figure

att.viz.plot_barcode(diagrams, ax=None)[source]

Plot persistence barcodes.

Parameters:
Return type:

Figure

att.viz.plot_betti_curve(betti_curves, ax=None)[source]

Plot Betti curves.

Parameters:
Return type:

Figure

att.viz.plot_attractor_3d(cloud, color_by='time', backend='plotly')[source]

3D scatter/line plot of an attractor point cloud.

Parameters:
  • cloud ((n_points, 3+) array — uses first 3 columns)

  • color_by ("time" (color by index))

  • backend ("plotly" or "matplotlib")

att.viz.plot_surrogate_distribution(observed, surrogates, ax=None)[source]

Histogram of surrogate scores with observed score marked.

Parameters:
Return type:

Figure

att.viz.plot_benchmark_sweep(results, ax=None)[source]

Plot benchmark sweep with all methods overlaid.

Parameters:

results (pd.DataFrame with columns coupling, method, score, score_normalized)

Return type:

Figure

att.viz.plot_binding_comparison(detector)[source]

3-panel comparison: marginal X | joint (excess highlighted) | marginal Y.

Parameters:

detector (BindingDetector with fitted state)

Return type:

matplotlib Figure

att.viz.plot_binding_image(images, colormap='RdBu_r')[source]

Heatmap of residual persistence images.

Parameters:
  • images (list of (resolution, resolution) residual images, one per dimension)

  • colormap (diverging colormap (red=emergent, blue=deficit))

Return type:

matplotlib Figure

att.viz.plot_transition_timeline(detector, ground_truth=None, figsize=(12, 6))[source]

Plot topology transition timeline from a fitted TransitionDetector.

Parameters:
  • detector (TransitionDetector) – Must have been fit_transform()’d.

  • ground_truth (list of int or None) – True transition sample indices (plotted as green dotted lines).

  • figsize (tuple) – Figure size.

Return type:

matplotlib Figure

att.viz.export_to_json(results, path)[source]

Export computed results as JSON.

Parameters:
Return type:

None

att.viz.load_from_json(path)[source]

Load results from JSON.

Parameters:

path (str)

Return type:

dict

Publication-quality plotting utilities.

att.viz.plotting.plot_persistence_diagram(diagrams, ax=None, colormap='viridis')[source]

Plot persistence diagrams for all homology dimensions.

Parameters:
Return type:

Figure

att.viz.plotting.plot_persistence_image(images, ax=None, colormap='hot')[source]

Plot persistence images for all homology dimensions.

Parameters:
Return type:

Figure

att.viz.plotting.plot_barcode(diagrams, ax=None)[source]

Plot persistence barcodes.

Parameters:
Return type:

Figure

att.viz.plotting.plot_betti_curve(betti_curves, ax=None)[source]

Plot Betti curves.

Parameters:
Return type:

Figure

att.viz.plotting.plot_attractor_3d(cloud, color_by='time', backend='plotly')[source]

3D scatter/line plot of an attractor point cloud.

Parameters:
  • cloud ((n_points, 3+) array — uses first 3 columns)

  • color_by ("time" (color by index))

  • backend ("plotly" or "matplotlib")

att.viz.plotting.plot_surrogate_distribution(observed, surrogates, ax=None)[source]

Histogram of surrogate scores with observed score marked.

Parameters:
Return type:

Figure

att.viz.plotting.plot_benchmark_sweep(results, ax=None)[source]

Plot benchmark sweep with all methods overlaid.

Parameters:

results (pd.DataFrame with columns coupling, method, score, score_normalized)

Return type:

Figure

att.viz.plotting.plot_binding_comparison(detector)[source]

3-panel comparison: marginal X | joint (excess highlighted) | marginal Y.

Parameters:

detector (BindingDetector with fitted state)

Return type:

matplotlib Figure

att.viz.plotting.plot_binding_image(images, colormap='RdBu_r')[source]

Heatmap of residual persistence images.

Parameters:
  • images (list of (resolution, resolution) residual images, one per dimension)

  • colormap (diverging colormap (red=emergent, blue=deficit))

Return type:

matplotlib Figure

att.viz.plotting.export_to_json(results, path)[source]

Export computed results as JSON.

Parameters:
Return type:

None

att.viz.plotting.load_from_json(path)[source]

Load results from JSON.

Parameters:

path (str)

Return type:

dict

att.viz.plotting.plot_transition_timeline(detector, ground_truth=None, figsize=(12, 6))[source]

Plot topology transition timeline from a fitted TransitionDetector.

Parameters:
  • detector (TransitionDetector) – Must have been fit_transform()’d.

  • ground_truth (list of int or None) – True transition sample indices (plotted as green dotted lines).

  • figsize (tuple) – Figure size.

Return type:

matplotlib Figure