Skip to content

Commit

Permalink
fix unknown version number problem
Browse files Browse the repository at this point in the history
  • Loading branch information
mmhs013 committed Jun 4, 2020
1 parent f5f3554 commit 081a1de
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Mann-Kendall Test is a powerful trend test, so several others modified Mann-Kend

11. **Partial MK Test (*partial_test*):** In a real event, many factors are affecting the main studied response parameter, which can bias the trend results. To overcome this problem, Libiseller (2002) proposed this partial mk test. It required two parameters as input, where, one is response parameter and other is an independent parameter.

12. **Theil-sen's Slope Estimator (*sens_slope*):** This method proposed by Theil (1950) and Sen (1968) to estimate the magnitude of the monotonic trend. Intercept is calculate using Conover, W.J. (1980) method.
12. **Theil-Sen's Slope Estimator (*sens_slope*):** This method proposed by Theil (1950) and Sen (1968) to estimate the magnitude of the monotonic trend. Intercept is calculate using Conover, W.J. (1980) method.

13. **Seasonal sen's Slope Estimator (*seasonal_sens_slope*):** This method proposed by Hipel (1994) to estimate the magnitude of the monotonic trend, when data has seasonal effects. Intercept is calculate using Conover, W.J. (1980) method.
13. **Seasonal Theil-Sen's Slope Estimator (*seasonal_sens_slope*):** This method proposed by Hipel (1994) to estimate the magnitude of the monotonic trend, when data has seasonal effects. Intercept is calculate using Conover, W.J. (1980) method.

## Function details:

Expand All @@ -58,8 +58,8 @@ And all Mann-Kendall tests return a named tuple which contained:
- **Tau**: Kendall Tau
- **s**: Mann-Kendal's score
- **var_s**: Variance S
- **slope**: sen's slope
- **intercept**: trend line intercept value, for seasonal test, full period cycle consider as unit time step
- **slope**: Theil-Sen estimator/slope
- **intercept**: intercept of Kendall-Theil Robust Line, for seasonal test, full period cycle consider as unit time step

sen's slope function required data vector. seasonal sen's slope also has optional input period, which by the default value is 12. Both sen's slope function return only slope value.

Expand Down
6 changes: 3 additions & 3 deletions pymannkendall/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .pymannkendall import sens_slope, seasonal_sens_slope, original_test, hamed_rao_modification_test, yue_wang_modification_test, pre_whitening_modification_test, trend_free_pre_whitening_modification_test, multivariate_test, seasonal_test, regional_test, correlated_multivariate_test, correlated_seasonal_test, partial_test

__all__ = [sens_slope, seasonal_sens_slope, original_test, hamed_rao_modification_test, yue_wang_modification_test, pre_whitening_modification_test, trend_free_pre_whitening_modification_test, multivariate_test, seasonal_test, regional_test, correlated_multivariate_test, correlated_seasonal_test, partial_test]

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

__all__ = [sens_slope, seasonal_sens_slope, original_test, hamed_rao_modification_test, yue_wang_modification_test, pre_whitening_modification_test, trend_free_pre_whitening_modification_test, multivariate_test, seasonal_test, regional_test, correlated_multivariate_test, correlated_seasonal_test, partial_test, __version__]
del get_versions
53 changes: 26 additions & 27 deletions pymannkendall/pymannkendall.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Created on 05 March 2018
Update on 30 May 2020
@author: Md. Manjurul Hussain Shourov
version: 1.4
version: 1.4.1
Approach: Vectorisation
Citation: Hussain et al., (2019). pyMannKendall: a python package for non parametric Mann Kendall family of trend tests.. Journal of Open Source Software, 4(39), 1556, https://doi.org/10.21105/joss.01556
"""
Expand Down Expand Up @@ -164,8 +164,8 @@ def sens_slope(x):
Input:
x: a one dimensional vector (list, numpy array or pandas series) data
Output:
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line
Examples
--------
>>> x = np.random.rand(120)
Expand All @@ -188,8 +188,8 @@ def seasonal_sens_slope(x_old, period=12):
x: a vector (list, numpy array or pandas series) data
period: seasonal cycle. For monthly data it is 12, weekly data it is 52 (12 is the default)
Output:
slope: sen's slope
intercept: trend line intercept value, where full period cycle consider as unit time step
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line, where full period cycle consider as unit time step
Examples
--------
>>> x = np.random.rand(120)
Expand Down Expand Up @@ -231,8 +231,8 @@ def original_test(x_old, alpha = 0.05):
Tau: Kendall Tau
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -268,8 +268,8 @@ def hamed_rao_modification_test(x_old, alpha = 0.05, lag=None):
Tau: Kendall Tau
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -331,8 +331,8 @@ def yue_wang_modification_test(x_old, alpha = 0.05, lag=None):
Tau: Kendall Tau
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -383,8 +383,8 @@ def pre_whitening_modification_test(x_old, alpha = 0.05):
z: normalized test statistics
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -426,8 +426,8 @@ def trend_free_pre_whitening_modification_test(x_old, alpha = 0.05):
z: normalized test statistics
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -477,8 +477,8 @@ def multivariate_test(x_old, alpha = 0.05):
Tau: Kendall Tau
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -528,8 +528,8 @@ def seasonal_test(x_old, period = 12, alpha = 0.05):
Tau: Kendall Tau
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value, where full period cycle consider as unit time step
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line, where full period cycle consider as unit time step
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -565,8 +565,8 @@ def regional_test(x_old, alpha = 0.05):
Tau: Kendall Tau
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -594,8 +594,8 @@ def correlated_multivariate_test(x_old, alpha = 0.05):
Tau: Kendall Tau
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -657,8 +657,8 @@ def correlated_seasonal_test(x_old, period = 12 ,alpha = 0.05):
Tau: Kendall Tau
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value, where full period cycle consider as unit time step
slope: Theil-Sen estimator/slope
intercept: intercept of Kendall-Theil Robust Line, where full period cycle consider as unit time step
Examples
--------
>>> import pymannkendall as mk
Expand Down Expand Up @@ -695,8 +695,7 @@ def partial_test(x_old, alpha = 0.05):
Tau: Kendall Tau
s: Mann-Kendal's score
var_s: Variance S
slope: sen's slope
intercept: trend line intercept value
slope: Theil-Sen estimator/slope
Examples
--------
>>> import pymannkendall as mk
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
__version__ = versioneer.get_version()
__email__ = "mmhs013@gmail.com"
__license__ = "MIT"
__copyright__ = "Copyright Md. Manjurul Hussain Shourov (2019)"
__copyright__ = "Copyright Md. Manjurul Hussain Shourov (2020)"

with open("README.md", "r") as fh:
long_description = fh.read()

setup(
name = "pymannkendall",
version = __version__,
cmdclass=versioneer.get_cmdclass(),
author = __author__,
author_email = __email__,
description = ("A python package for non-parametric Mann-Kendall family of trend tests."),
Expand Down

0 comments on commit 081a1de

Please sign in to comment.