Skip to content

Commit

Permalink
update base class
Browse files Browse the repository at this point in the history
  • Loading branch information
eastjames committed May 22, 2023
1 parent 466ce80 commit e4f05e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/pyextremes/tests/ks_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __init__(
extremes=extremes,
distribution=distribution,
fit_parameters=fit_parameters,
fixed_parameters=fixed_parameters,
significance_level=significance_level,
)

Expand Down
10 changes: 8 additions & 2 deletions src/pyextremes/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def __init__(
extremes,
distribution: typing.Union[str, scipy.stats.rv_continuous],
fit_parameters: typing.Dict[str, float],
fixed_parameters: typing.Dict[str, float],
significance_level: float = 0.05,
) -> None:
"""Perform a statistical test.
Expand All @@ -26,8 +27,12 @@ def __init__(
See https://docs.scipy.org/doc/scipy/reference/stats.html
fit_parameters : dict
Dictionary with fit parameters passed to the `distribution` '.cdf' method.
E.g. {"c": 0.3, "loc": 10, "scale": 2} for `distribution`
with shape, location, and scale parameters.
E.g. {"c": 0.3, "scale": 2} for `distribution`
with shape and scale parameters.
fixed_parameters : dict
Dictionary with fixed parameters passed to the `distribution` '.cdf' method.
E.g. {"loc": 10} for `distribution`
with location parameter.
significance_level : float, optional
Significance level in the range (0, 1).
By default 0.05
Expand All @@ -47,6 +52,7 @@ def __init__(
)

self.fit_parameters = fit_parameters
self.fixed_parameters = fixed_parameters
self.significance_level = significance_level

@property
Expand Down

0 comments on commit e4f05e8

Please sign in to comment.