-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Band Depth Capability #4
base: main
Are you sure you want to change the base?
Conversation
@@ -1021,9 +1027,9 @@ def scenario_plot(location, target, scenario, ui, age_group, round_tab, ens_chec | |||
Input("sample-slider", "value"), | |||
Input("median-checkbox", "value"), | |||
Input("tabs-round", "value")) | |||
def spaghetti_plot(location, target, scenario, age_group, n_sample, med_plot, round_tab): | |||
def spaghetti_plot(location, target, scenario, age_group, n_sample, med_plot, round_tab, band_depth_limit=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed documentation to add:
"""
:param location: str used to construct path to sample file to load in visualization/data-visualization
:param target: str, 'inc hosp' or 'cum hosp'. Used to construct path to sample file to load in visualization/data-visualization
:param scenario: List[int], used to filter sample file
:param age_group: str, used to filter sample file
:param n_sample: int, number of samples to display
:param med_plot: bool, if True, median trajectory displayed
:param round_tab: str, name of Round (as seen in hub-config/viz_settings.json) to be used
:param band_depth_limit: float| None. If not None, will show an envelope in resulting spaghetti plot around trajectories with a band depth above this value. Band depth is a measure of the representativeness of one trajectory among an ensemble. For more details, see https://ieeexplore.ieee.org/document/6875964 - Curve Boxplot: Generalization of Boxplot for Ensembles of Curves by Mirzargar et al.
:return: go.Figure object result
"""
Adds the capability to display band depth envelopes (as described in Curve Boxplot: Generalization of Boxplot for Ensembles of Curves) for spaghetti plots.
Currently,
spaghetti_plot()
is configured to not display these envelopes as the default behavior because its parameterband_depth_limit=None
, but this functionality could be added in a future PR by changing this parameter to take on values between 0 and 1.NOTE: Relies on PR 'Band depth envelope' in SMHviz_plot (midas-network/SMHviz_plot#17).