Visualization API Reference

Dashboard

The ExperimentDashboard provides an interactive web interface for experiment analysis.

Basic Usage

from orruns.visualization import ExperimentDashboard

# Launch dashboard
dashboard = ExperimentDashboard()
dashboard.run(port=8050)  # Visit http://localhost:8050

Features

  1. Experiment Overview
  2. Total runs
  3. Best performance
  4. Latest run status

  5. Interactive Plots

  6. Metric distributions
  7. Convergence curves
  8. Parameter relationships

  9. Data Analysis

  10. Statistical summaries
  11. Parameter comparisons
  12. Artifact visualization

Plot Types

Box Plots

from orruns.visualization import PlotManager

plot_manager = PlotManager()

# Basic box plot
fig = plot_manager.create_box_plot(
    data=df,
    metric="objective",
    title="Objective Value Distribution"
)

# Grouped box plot
fig = plot_manager.create_grouped_box_plot(
    data=df,
    value_col="objective",
    group_col="solver",
    metric="objective",
    title="Objective by Solver"
)

Line Plots

# Single line plot
fig = plot_manager.create_line_plot(
    data=convergence_data,
    metric="gap",
    title="Convergence History"
)

# Grouped line plot with confidence intervals
fig = plot_manager.create_grouped_line_plot(
    data=convergence_data,
    metric="gap",
    title="Convergence by Method"
)

Advanced Visualizations

# Parameter relationships
fig = plot_manager.create_parallel_coordinates(
    data=df,
    params=["threads", "method", "cuts"],
    metric="objective"
)

# Correlation matrix
fig = plot_manager.create_scatter_matrix(
    data=df,
    params=["threads", "method", "cuts"],
    metric="objective"
)

Customization

Plot Theme

plot_manager = PlotManager()
plot_manager.theme = 'plotly_white'  # Change theme
plot_manager.colors = ['#1f77b4', '#ff7f0e']  # Custom colors

Layout Options

plot_manager.default_layout.update({
    'paper_bgcolor': 'white',
    'plot_bgcolor': '#f8f9fa',
    'font': {'family': 'Arial'}
})

Dashboard Configuration

Custom Base Directory

dashboard = ExperimentDashboard(
    base_dir="/path/to/experiments"
)

Server Options

dashboard.run(
    port=8080,
    debug=True,
    host='0.0.0.0'  # Allow external access
)

Best Practices

  1. Performance
  2. Filter large datasets before plotting
  3. Use appropriate plot types for data size

  4. Readability

  5. Add clear titles and labels
  6. Use consistent color schemes
  7. Include units in axis labels

  8. Interactivity

  9. Enable zooming for dense plots
  10. Add hover information
  11. Include download options

Common Issues

Issue Solution
Slow loading Reduce data points or use sampling
Missing plots Check data format and availability
Port conflict Change dashboard port number