Skip to content

Commit

Permalink
InteractionPlot refactor (#3096)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #3096

When this is landed we will be able to use this plot in Ax 1.0 and Ax UI.

Refactor the interaction plot to be in line with our structure for ax.analysis. This includes a massive reduction in overall code (about half) and a full decoupling from ax.plot.

Adds robustness features around generating subplots -- a failed surface subplot will no longer fail the full analysis.

This new version of the plot is slightly more opinionated in that we always plot both the feature importance bar chart AND the top 6 features, always plots top 15 components in the bar chart, never decomposes components, and always has plots share scale. These settings are most useful and help drastically simplify the code, so I think we should keep them for now and only consider adding them back if there is demand.

Init arg removals:
* top_k: Prefer to show sobol indices for all components on bar chart, slice/sufrace for top 6 always
* data: Let's always use the data on the experiment
* display_components: Always display components
* decompose_components: Never decompose components
* plots_share_range: Always share range
* num_mc_samples: Always use 10k samples. Fwiw this was only added to speed up a unit test, which could be done effectively without this arg by using mocks

Reviewed By: mgarrard

Differential Revision: D65148289

fbshipit-source-id: cfc0a2ae086f82f7a2b6c6197f8dd3e2811d6f02
  • Loading branch information
mpolson64 authored and facebook-github-bot committed Nov 21, 2024
1 parent a6ddea8 commit 8fe3fed
Show file tree
Hide file tree
Showing 4 changed files with 325 additions and 701 deletions.
2 changes: 2 additions & 0 deletions ax/analysis/plotly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# pyre-strict

from ax.analysis.plotly.cross_validation import CrossValidationPlot
from ax.analysis.plotly.interaction import InteractionPlot
from ax.analysis.plotly.parallel_coordinates import ParallelCoordinatesPlot
from ax.analysis.plotly.plotly_analysis import PlotlyAnalysis, PlotlyAnalysisCard
from ax.analysis.plotly.scatter import ScatterPlot
Expand All @@ -15,6 +16,7 @@
__all__ = [
"ContourPlot",
"CrossValidationPlot",
"InteractionPlot",
"PlotlyAnalysis",
"PlotlyAnalysisCard",
"ParallelCoordinatesPlot",
Expand Down
Loading

0 comments on commit 8fe3fed

Please sign in to comment.