Ax icon indicating copy to clipboard operation
Ax copied to clipboard

CrossValidationPlot object

Open mgrange1998 opened this issue 1 year ago • 6 comments

Summary: CrossValidation is one of the most frequent plots used accross Ax. This change imports it to the ax.analysis module, simplifies its logic and provides a easy to use access point, which takes in the common experiment and model data types.

  • "get_df()" exports a basic dataframe with the data used to generate the plot
  • "get_fig()" exports the classic cross validation plots, with the same functionality as used today.

New Usage

from ax.analysis.cross_validation_plot import CrossValidationPlot

cv_plot = CrossValidationPlot(experiment=scheduler.experiment, model=model)
plot = cv_plot.get_fig()

Old Usage

from ax.plot.diagnostic import interact_cross_validation_plotly
from ax.modelbridge.cross_validation import cross_validate

cv_results = cross_validate(model=model)
plot = interact_cross_validation_plotly(cv_results)

Differential Revision: D54432757

mgrange1998 avatar Mar 06 '24 18:03 mgrange1998

This pull request was exported from Phabricator. Differential Revision: D54432757

facebook-github-bot avatar Mar 06 '24 18:03 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D54432757

facebook-github-bot avatar Mar 06 '24 18:03 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D54432757

facebook-github-bot avatar Mar 06 '24 19:03 facebook-github-bot

Codecov Report

Attention: Patch coverage is 96.30996% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 94.87%. Comparing base (e8018a2) to head (dd06d1b).

:exclamation: Current head dd06d1b differs from pull request most recent head 3803c9a. Consider uploading reports for the commit 3803c9a to get more accurate results

Files Patch % Lines
ax/analysis/helpers/color_helpers.py 66.66% 3 Missing :warning:
ax/analysis/helpers/plot_helpers.py 86.36% 3 Missing :warning:
ax/analysis/helpers/scatter_helpers.py 96.42% 2 Missing :warning:
ax/analysis/cross_validation_plot.py 97.22% 1 Missing :warning:
ax/analysis/helpers/cross_validation_helpers.py 98.61% 1 Missing :warning:
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2252    +/-   ##
========================================
  Coverage   94.86%   94.87%            
========================================
  Files         467      476     +9     
  Lines       46455    46726   +271     
========================================
+ Hits        44068    44329   +261     
- Misses       2387     2397    +10     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 06 '24 19:03 codecov-commenter

This pull request was exported from Phabricator. Differential Revision: D54432757

facebook-github-bot avatar Mar 06 '24 19:03 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D54432757

facebook-github-bot avatar Mar 06 '24 20:03 facebook-github-bot