sens_slope

imdlib.compute.sens_slope(x)

This method proposed by Theil (1950) and Sen (1968) to estimate the magnitude of the monotonic trend. Intercept calculated using Conover, W.J. (1980) method.

Parameters

x: a one dimensional vector (list, numpy array or pandas series) data

Returns

slope: Theil-Sen estimator/slope

Examples

>>> x = np.random.rand(120)
>>> slope,intercept = sens_slope(x)