Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Band Depth Capability #4

wants to merge 6 commits into from

Conversation

april-nellis
Copy link
Collaborator

@april-nellis april-nellis commented Dec 13, 2024

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 parameter band_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).

@@ -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):
Copy link
Collaborator

@jacobrklein20 jacobrklein20 Dec 13, 2024

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
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants