All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Regression tests for all major algorithms that check for small changes in the main output value.
- Nolds now supports numpy 2.x as well as 1.x.
- new parameter
closed
forsampen
to determine if<
or<=
should be used for checking if the distance between a vector pair is within the tolerance - new example
sampen-tol
that compares old and new default tolerance values forsampen
- more tests for
sampen
based on the logistic map and random data - new measures
mfhurst_b
calculates the multifractal "generalized" Hurst exponent according to Barabasi et al.mfhurst_dm
calculates the multifractal "generalized" Hurst exponent according to Di Matteo et al.
- new datasets
load_financial
loads three financial datasets from finance.yahoo.com that can be used to recreate the results from Di Matteo et al. 2003.barabasi1991_fractal
generates the fractal data used by Barabasi et al. in their 1991 paper
- new examples
hurst_mf_stock
example function recreates a plot from Di Matteo 2003.barabasi_1991_figure2
andbarabasi_1991_figure3
recreate the respective plots from Barabasi et al. 1991lorenz
calculates all main measures ofnolds
for x, y, and z coordinates of a Lorenz plot and compares them to prescribed values from the literature
- tests for all
nolds
existing measures based on the Lorenz system - additional tests for
dfa
allowing a direct comparison to the implementation in PhysioNet and using Lévy motion.
debug_data
forsampen
now also contains counts of similar vectorssampen
now issues a warning if one or both count variables are zero- the parameter
tolerance
insampen
now has a more sophisticated default value that takes into account that the chebyshev distance rises logarithmically with increasing dimension - uses
np.float64
as standarddtype
instead of"float32"
- input data of
lyap_e
is now converted tonp.float64
to avoid errors withinf
values for integer inputs (see #21) - completely revises the explanation of
dfa
with new and more accurate sources
- the test
test_measures.TestNoldsCorrDim.test_corr_dim
would fail ifsklearn
was not installed, because the standard "RANSAC" fitting method produces quite different results compared to the fallback "poly" method - uses
ddof=1
innp.std
when creating debug plot forsampen
and when computing defaultrvals
forcorr_dim
dfa
was applyingnp.sqrt
too early in the process. We actually only take the square root once after averaging over all windows.
- Issue #13: corr_dim ignored the fit argument
0.5.1 - 2018-10-24
- documentation for
lyap_r_len
,lyap_e_len
and thehurst-nvals
example
hurst_compare_nvals
now also usesnp.asarray
- some formatting problems in the documentation
0.5.0 - 2018-10-24
- test function
hurst_compare_nvals
that compares different choices for thenvals
parameter forhurst_rs
- example for
hurst_compare_nvals
(can be called usingpython -m nolds.examples hurst-nvals
) - helper functions
lyap_r_len
andlyap_e_len
to calculate minimum data length required forlyap_r
andlyap_e
- test cases
test_lyap_r_limits
andtest_lyap_e_limits
to ensure thatlyap_r_len
andlyap_e_len
are calculated correctly - description of parameter
min_nb
forlyap_e
- uses
np.asarray
wherever possible. The following functions should now also work with pandas objects and other "array-like" structures:lyap_r
lyap_e
sampen
hurst_rs
corr_dim
dfa
- nolds documentation can now also be found on readthedocs.org
- the previously internal helper function
expected_rs
is now available from the main module - calculates minimum data length for lyap_r to provide better error messages
- uses
rcond=-1
in lstseq to keep behavior consistent between numpy versions - mutes
ImportWarning
s fromsklearn
in unit tests - disables an ugly hack when using
RANSAC
as fitting method and instead requiressklearn>=0.19
that fixes the underlying issue - makes test case for correlation dimension less strict
- added hint when
nolds.examples
is called with an unknown example name
- note in the description of the parameter
tau
inlyap_r
was misleading/wrong (probably a copy-pase error)
- distance values
"euler"
,"chebychev"
,rowwise_euler
androwwise_chebychev
forsampen
andcorr_dim
(was deprecated) - keyword parameter
min_vectors
forlyap_r
(was deprecated)
0.4.1 - 2017-11-30
- function
logmid_n
that allows for a better choice ofnvals
parameter inhurst_rs
- adds more descriptions and instructions for comparing
hurst_rs
with other implementations
0.4.0 - 2017-11-21
- module
datasets
- dataset
brown72
that has a prescribed hurst exponent of 0.72 - generators for the logistic and the tent map
- true random numbers using the package
quantumrandom
- dataset
- test
test_hurst_pracma
that uses the same testing sequences forhurst_rs
as the R-packagepracma
- example function
plot_hurst_hist
that plots a histogram of hurst exponent values for random data - example function
weron_2002_figure2
fgn
for fractional gaussian noise in thedatasets
module- documentation for unittests and examples
- parameter
unbiased
forhurst_rs
that allows to choose between the new (fixed) behavior and the old one (using the wrong version of the standard deviation) - parameter
corrected
forhurst_rs
that applies the Anis-Lloyd correction factor to the example by default
- default choice for the parameter
nvals
inhurst_rs
now favors higher n values and always uses 16 n values fbm
is now moved to thedatasets
module
- using fitting method
'ransac'
when sklearn was not installed resulted in an exception instead of a warning - NaNs in
hurst_rs
where filtered from the set of (R/S)_n values, but the filtered values for n would remain in the calculation and fitting hurst_rs
used the wrong standard deviation, since we estimate the mean of the samples from the data we need to set the parameterddof
to1
0.3.4 - 2017-08-10
lyap_r
now has a new parameterfit_offset
that allows to ignore the first steps of the plot in the fitting process.
- The parameter
min_vectors
is now calledmin_neighbors
inlyap_r
and refers to the number of vectors that are candidates for the closest neighbor.
- The algorithm for choosing the
lag
would always choose 0 inlyap_r
. - There was an error in the calculation of the number of vectors used for
min_vectors
inlyap_r
.
0.3.3 - 2017-06-26
- more test cases for
sampen
debug_data
parameter for most measures that allows to retrieve the data used for debug plots for logging and creation of custom plots
sampen
now takes functions for thedist
parameter and not strings- using something else than
rowwise_chebychev
fordist
insampen
is now officially discouraged
- naming confusion: "Euler" distance should be "Euclidean" distance
- typo in the name "Chebyshev"
- all changes mentioned above are backwards-compatible, but this compatibility will be dropped in the next version (since these are really stupid errors that I want to sweep under the rug 😉)
0.3.2 - 2016-11-19
LICENSE.txt
is now part of the distribution- specifies platform (any) and license (MIT) in
setup.py
- loads
long_description
fromREADME.rst
0.3.1 - 2016-11-18
- typo in
setup.py
regardingextras_require
0.3.0 - 2016-11-18
- Allows to use RANSAC as line fitting algorithm
- Uses classifiers in
setup.py
- Adds requirements for the packages
future
andsetuptools
- Adds custom clean command to
setup.py
- Made support of both Python 3 and Python 2 official using the
future
package (Previous versions also supported Python 2 but did not state this and may have small performance issues.)
- deprecation warning about
assertAlmostEquals
in test cases
0.2.1 - 2016-10-17
- Description on PyPI was broken due to formatting error in README.rst
0.2.0 - 2016-10-14
- exportable documentation with Sphinx
- this change log
- unit tests (
python -m unittest nolds.test_measures
) - example code can be run with
python -m nolds.examples all
- code formatted according to PEP8 (but with 2 spaces indent instead of 4)
- wrong default plotting parameters for function
sampen
0.1.1 - 2016-08-03
- nolds now lists numpy as dependency (it had the dependency before, but did not tell the user, because who the hell uses python without numpy ;P)
0.1.0 - 2016-08-05
- initial release including the following algorithms:
- sample entropy (
sampen
) - correlation dimension (
corr_dim
) - Lyapunov exponent (
lyap_r
,lyap_e
) - Hurst exponent (
hurst_rs
) - detrended fluctuation analysis (DFA) (
dfa
)
- sample entropy (