Skip to content

Multi yoy no label#498

Open
cdeline wants to merge 7 commits intoNatLabRockies:developmentfrom
cdeline:multi_YoY_no_label
Open

Multi yoy no label#498
cdeline wants to merge 7 commits intoNatLabRockies:developmentfrom
cdeline:multi_YoY_no_label

Conversation

@cdeline
Copy link
Copy Markdown
Collaborator

@cdeline cdeline commented Mar 24, 2026

  • Code changes are covered by tests
  • Code changes have been evaluated for compatibility/integration with TrendAnalysis
  • New functions added to __init__.py
  • API.rst is up to date, along with other sphinx docs pages
  • Example notebooks are rerun and differences in results scrutinized
  • Updated changelog
  • Update degradation and multi-YoY notebook example to remove label=
  • Remove old degradation_timeseries_plot_old function cruft

@cdeline cdeline marked this pull request as draft March 24, 2026 21:44
@cdeline cdeline marked this pull request as ready for review March 24, 2026 23:16
@cdeline
Copy link
Copy Markdown
Collaborator Author

cdeline commented Mar 24, 2026

OK, so it looks like taking the median of every slope whose center-point falls within the moving window will re-create the original pd.rolling() approach for the standard (non-multi-yoy) case. Another change is that the new approach effectively labels the datapoints with label=center while the old approach is defaulting to label=right. This could be fixed if we wanted to go back to the original implementation.
image

@cdeline
Copy link
Copy Markdown
Collaborator Author

cdeline commented Mar 24, 2026

.. But with the multi-YoY output, taking the median of all slopes rather than a pointwise average will result in much more smoothing in the center of the timeseries (where you have more slopes available), but more variability at start and end of the timeseries when you're only averaging the 1-yr slopes.
image

@martin-springer
Copy link
Copy Markdown
Collaborator

.. But with the multi-YoY output, taking the median of all slopes rather than a pointwise average will result in much more smoothing in the center of the timeseries (where you have more slopes available), but more variability at start and end of the timeseries when you're only averaging the 1-yr slopes. image

Agreed, with the multi-yoy approach the time series plot becomes less meaningful as it kind of converges to the overall system degradation rate in the center of the plot and that's kind of unrelated to the years shown in the x-labels. How about, for plotting purposes, we only use the 1-year slopes (slopes <1.5 year to account for leap years) for the whole plot? Would this give us a better representation of the system degradation along the time axis?

@cdeline
Copy link
Copy Markdown
Collaborator Author

cdeline commented Mar 27, 2026

We could leverage the rolling_days input parameter - like filter out slopes that are longer than > (rolling_days *1.1). Then you should get similar plots whether you use multi-yoy or regular.

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