-
Notifications
You must be signed in to change notification settings - Fork 61
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
sdba - Fix DQM and QDM, refactor adjustment objects #447
Conversation
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.
Has a test already been added for this in the other PRs ? Otherwise we'll want one.
Co-authored-by: David Huard <[email protected]>
Pull Request Test Coverage Report for Build 1864
💛 - Coveralls |
Merged fixes for QDM in this PR to save time. Dask-arrays needed a new version of |
@@ -37,13 +37,17 @@ | |||
- preprocessing on `ref`, `hist` and `sim` (using methods in `xclim.sdba.processing` or `xclim.sdba.detrending`) | |||
- creating the adjustment object `Adj = Adjustment(**kwargs)` (from `xclim.sdba.adjustment`) | |||
- training `Adj.train(obs, sim)` | |||
- adjustment `scen = Adj.adjust(sim)` | |||
- adjustment with corresponding arguments `scen = Adj.adjust(sim, **kwargs)` |
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.
- adjustment with corresponding arguments `scen = Adj.adjust(sim, **kwargs)` | |
- adjustment `scen = Adj.adjust(sim, **kwargs)` |
- post-processing on `scen` (for example: re-trending) | ||
|
||
The train-adjust approach allows to inspect the trained adjustment object. The adjustment information is stored in | ||
The train-adjust approach allows to inspect the trained adjustment object. The trained information is stored in |
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.
The train-adjust approach allows to inspect the trained adjustment object. The trained information is stored in | |
The train-adjust approach allows to inspect the trained adjustment object. The training information is stored in |
@@ -127,17 +132,22 @@ class EmpiricalQuantileMapping(BaseAdjustment): | |||
|
|||
Parameters | |||
---------- | |||
At init: |
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.
At init: | |
At instantiation: |
group : Union[str, Grouper] | ||
The grouping information. See :py:class:`xclim.sdba.base.Grouper` for details. | ||
|
||
In adjust: |
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.
In adjust: | |
In adjustment: |
Pull Request Checklist:
bumpversion (minor / major / patch)
has been called on this branchgit push --tags
)Fixes #441 by adding a grouped normalization before the detrending in DQM.
Does this PR introduce a breaking change?
No, but the behavior is not exactly what a user could expect from reading Cannon et al. 2015, a note is added in the docs to clarify this.
Other information: