Skip to content

Commit

Permalink
Merge pull request #329 from raybellwaves/just-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
raybellwaves committed May 21, 2021
2 parents 3963a4b + 60f974c commit 6f7be06
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
4 changes: 1 addition & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autodoc.typehints",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.extlinks",
Expand All @@ -49,13 +48,12 @@
"pr": ("https://github.com/xarray-contrib/xskillscore/pull/%s", "GH#"),
}

autodoc_typehints = "description"
autodoc_typehints = "none"

nbsphinx_timeout = 60
nbsphinx_execute = "always"

autosummary_generate = True
autodoc_typehints = "none"

napoleon_use_param = True
napoleon_use_rtype = True
Expand Down
32 changes: 12 additions & 20 deletions xskillscore/core/comparative.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

from . import deterministic as dm

XArray = Union[xr.Dataset, xr.DataArray]


def sign_test(
forecasts1,
Expand Down Expand Up @@ -69,14 +71,11 @@ def sign_test(
Returns
-------
xarray.DataArray or xarray.Dataset
Boolean returns answering whether forecast1 is significantly different to
forecast2.
boolean whether ``forecast1`` is significantly different to ``forecast2``.
xarray.DataArray or xarray.Dataset
Positive (negative) walk values shows how often ``forecast1`` is better (worse)
than ``forecast2`` according to metric computed over ``dim``.
walk values shows how often ``forecast1`` is better ``forecast2``.
xarray.DataArray or xarray.Dataset
confidence shows the positive boundary for a random walk at significance
level ``alpha``.
confidence boundary for a random walk at significance level ``alpha``.
Examples
--------
Expand Down Expand Up @@ -196,19 +195,15 @@ def _categorical_metric(observations, forecasts, dim):


def halfwidth_ci_test(
forecasts1: Union[xr.Dataset, xr.DataArray],
forecasts2: Union[xr.Dataset, xr.DataArray],
observations: Optional[Union[xr.Dataset, xr.DataArray]] = None,
forecasts1: XArray,
forecasts2: XArray,
observations: Optional[XArray] = None,
metric: Optional[str] = None,
dim: Optional[Union[str, List[str]]] = None,
time_dim: str = "time",
alpha: float = 0.05,
**kwargs: Mapping,
) -> Tuple[
Union[xr.Dataset, xr.DataArray],
Union[xr.Dataset, xr.DataArray],
Union[xr.Dataset, xr.DataArray],
]:
) -> Tuple[XArray, XArray, XArray]:
"""
Returns the Jolliffe and Ebert significance test.
Expand Down Expand Up @@ -238,7 +233,7 @@ def halfwidth_ci_test(
metric : str, optional
Name of distance metric function to be used for computing the error between
forecasts and observation. It can be any of the xskillscore distance metric
function except for``mape``. Valid metrics are ``me``, ``rmse``, ``mse``,
function except for ``mape``. Valid metrics are ``me``, ``rmse``, ``mse``,
``mae``, ``median_absolute_error`` and ``smape``. Note that if metric is None,
observations must also be None.
Defaults to None.
Expand All @@ -258,11 +253,9 @@ def halfwidth_ci_test(
Returns
-------
xarray.DataArray or xarray.Dataset
Is the difference in scores (score(f2) - score(f1)) significant?
(returns boolean).
boolean whether the difference in scores (score(f2) - score(f1)) are significant.
xarray.DataArray or xarray.Dataset
Difference in scores (score(f2) - score(f1)) reduced by ``dim`` and
``time_dim``.
difference in scores (score(f2) - score(f1)) reduced by ``dim`` and ``time_dim``.
xarray.DataArray or xarray.Dataset
half-width of the confidence interval at the significance level ``alpha``.
Expand Down Expand Up @@ -296,7 +289,6 @@ def halfwidth_ci_test(
<xarray.DataArray ()>
array(True)
References
----------
* https://www.cawcr.gov.au/projects/verification/CIdiff/FAQ-CIdiff.html
Expand Down

0 comments on commit 6f7be06

Please sign in to comment.