Skip to content

Commit

Permalink
add monthly AR1 process utilities (MESMER-group#473)
Browse files Browse the repository at this point in the history
* add monthly AR1 process utilities

* add tests

* add new functions to stats init

* reshape AR output dims from year, month to time

* new drawing method and change in predict function

* add test for drawing

* remove buffer as multiple of 12

* extract drawing innovations

* comments and nits

* start autoregression at one

* allow covariance none

* adjust tests

* changelog

* documentation

* fixes

* make args in draw_autoregression_monthly keyword only

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 22, 2024
1 parent 57c98d6 commit d8bac96
Show file tree
Hide file tree
Showing 4 changed files with 615 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ that this led to some numerical changes compared to the MESMER-M publication
`#419 <https://github.com/MESMER-group/mesmer/pull/419>`_, and
`#421 <https://github.com/MESMER-group/mesmer/pull/421>`_).

**Auto-Regression**

- Implement functions performing the monthly (cyclo-stationary) auto-regression and adapt these functions to
work with xarray. This includes extracting the drawing of spatially correlated innovations to a
stand-alone function. (`#473 <https://github.com/MESMER-group/mesmer/pull/473>`_)

**Yeo-Johnson power transformer**

- Ensure the power transformer yields the correct normalization for more cases (
Expand Down
6 changes: 6 additions & 0 deletions mesmer/stats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
_fit_auto_regression_scen_ens,
_select_ar_order_scen_ens,
draw_auto_regression_correlated,
draw_auto_regression_monthly,
draw_auto_regression_uncorrelated,
fit_auto_regression,
fit_auto_regression_monthly,
predict_auto_regression_monthly,
select_ar_order,
)
from mesmer.stats._gaspari_cohn import gaspari_cohn, gaspari_cohn_correlation_matrices
Expand All @@ -22,6 +25,9 @@
"draw_auto_regression_uncorrelated",
"fit_auto_regression",
"select_ar_order",
"fit_auto_regression_monthly",
"predict_auto_regression_monthly",
"draw_auto_regression_monthly",
# gaspari cohn
"gaspari_cohn_correlation_matrices",
"gaspari_cohn",
Expand Down
Loading

0 comments on commit d8bac96

Please sign in to comment.