boofun.visualization.interactive
Interactive visualizations using Plotly.
This module provides interactive visualizations for Boolean function analysis, including Fourier spectrum exploration, influence heatmaps, and comparison tools.
Functions
|
Create interactive comparison of complexity measures. |
|
Create an interactive Fourier spectrum visualization. |
|
Create interactive explorer for function family growth. |
|
Create an interactive heatmap of variable influences. |
Classes
Interactive Fourier coefficient explorer. |
- boofun.visualization.interactive.interactive_fourier_spectrum(f: BooleanFunction, show_labels: bool = True, highlight_threshold: float = 0.1, color_by_degree: bool = True, height: int = 600, width: int = 900) go.Figure[source]
Create an interactive Fourier spectrum visualization.
Features: - Hover to see coefficient details - Click to highlight specific coefficients - Zoom and pan - Color by degree or magnitude
- Parameters:
f – BooleanFunction to visualize
show_labels – Show subset labels on bars
highlight_threshold – Highlight coefficients above this magnitude
color_by_degree – Color bars by Fourier degree
height – Figure height
width – Figure width
- Returns:
Plotly figure
- boofun.visualization.interactive.interactive_influence_heatmap(f: BooleanFunction, height: int = 400, width: int = 600) go.Figure[source]
Create an interactive heatmap of variable influences.
- Parameters:
f – BooleanFunction to visualize
height – Figure height
width – Figure width
- Returns:
Plotly figure
- boofun.visualization.interactive.interactive_complexity_comparison(f: BooleanFunction, height: int = 500, width: int = 800) go.Figure[source]
Create interactive comparison of complexity measures.
- Parameters:
f – BooleanFunction to analyze
height – Figure height
width – Figure width
- Returns:
Plotly figure with radar chart of complexity measures
- boofun.visualization.interactive.interactive_growth_explorer(family: FunctionFamily, n_range: Tuple[int, int, int] = (3, 15, 2), properties: List[str] = None, height: int = 600, width: int = 1000) go.Figure[source]
Create interactive explorer for function family growth.
Features: - Slider to animate through n values - Multiple property plots - Theoretical overlays
- Parameters:
family – Function family to explore
n_range – (start, stop, step) for n values
properties – Properties to plot (default: influence, degree)
height – Figure height
width – Figure width
- Returns:
Plotly figure with animation
- class boofun.visualization.interactive.FourierExplorer(f: BooleanFunction)[source]
Interactive Fourier coefficient explorer.
Provides a comprehensive interface for exploring the Fourier structure of Boolean functions.
- __init__(f: BooleanFunction)[source]
Initialize explorer with a Boolean function.
- Parameters:
f – BooleanFunction to explore
- degree_distribution(height: int = 400, width: int = 600) go.Figure[source]
Plot spectral weight by degree.
- Parameters:
height – Figure height
width – Figure width
- Returns:
Plotly figure