Software Open Access

Nonlinear measures for dynamical systems

Schölzel, Christopher


DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
  <identifier identifierType="DOI">10.5281/zenodo.3814723</identifier>
  <creators>
    <creator>
      <creatorName>Schölzel, Christopher</creatorName>
      <givenName>Christopher</givenName>
      <familyName>Schölzel</familyName>
      <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="http://orcid.org/">0000-0001-8627-0594</nameIdentifier>
      <affiliation>THM University of Applied Sciences</affiliation>
    </creator>
  </creators>
  <titles>
    <title>Nonlinear measures for dynamical systems</title>
  </titles>
  <publisher>Zenodo</publisher>
  <publicationYear>2019</publicationYear>
  <subjects>
    <subject>dynamical systems</subject>
    <subject>entropy</subject>
    <subject>chaos</subject>
    <subject>fractal dimension</subject>
    <subject>lyapunov exponent</subject>
    <subject>hurst exponent</subject>
    <subject>detrended fluctuation analysis</subject>
    <subject>sample entropy</subject>
    <subject>correlation dimension</subject>
    <subject>python</subject>
  </subjects>
  <dates>
    <date dateType="Issued">2019-06-16</date>
  </dates>
  <language>en</language>
  <resourceType resourceTypeGeneral="Software"/>
  <alternateIdentifiers>
    <alternateIdentifier alternateIdentifierType="url">https://github.com/CSchoel/nolds/releases/tag/0.5.2</alternateIdentifier>
    <alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/3814723</alternateIdentifier>
  </alternateIdentifiers>
  <relatedIdentifiers>
    <relatedIdentifier relatedIdentifierType="URL" relationType="IsDocumentedBy" resourceTypeGeneral="Text">https://nolds.readthedocs.io/en/0.5.2/</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.3814722</relatedIdentifier>
  </relatedIdentifiers>
  <version>0.5.2</version>
  <rightsList>
    <rights rightsURI="https://opensource.org/licenses/MIT">MIT License</rights>
    <rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
  </rightsList>
  <descriptions>
    <description descriptionType="Abstract">&lt;p&gt;&lt;strong&gt;NOnLinear measures for Dynamical Systems (nolds)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Nolds is a small numpy-based library that provides an implementation and a learning resource for nonlinear measures for dynamical systems based on one-dimensional time series. Currently the following measures are implemented:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;sample entropy&lt;/em&gt; (&lt;code&gt;sampen&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;Measures the complexity of a time-series, based on approximate entropy&lt;/p&gt;

&lt;p&gt;&lt;em&gt;correlation dimension&lt;/em&gt; (&lt;code&gt;corr_dim&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;A measure of the &lt;em&gt;fractal dimension&lt;/em&gt; of a time series which is also related to complexity.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Lyapunov exponent&lt;/em&gt; (&lt;code&gt;lyap_r&lt;/code&gt;, &lt;code&gt;lyap_e&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;Positive Lyapunov exponents indicate chaos and unpredictability. Nolds provides the algorithm of Rosenstein et al. (&lt;code&gt;lyap_r&lt;/code&gt;) to estimate the largest Lyapunov exponent and the algorithm of Eckmann et al. (&lt;code&gt;lyap_e&lt;/code&gt;) to estimate the whole spectrum of Lyapunov exponents.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hurst exponent&lt;/em&gt; (&lt;code&gt;hurst_rs&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;The hurst exponent is a measure of the &amp;quot;long-term memory&amp;quot; of a time series. It can be used to determine whether the time series is more, less, or equally likely to increase if it has increased in previous steps. This property makes the Hurst exponent especially interesting for the analysis of stock data.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;detrended fluctuation analysis (DFA)&lt;/em&gt; (&lt;code&gt;dfa&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;DFA measures the Hurst parameter &lt;em&gt;H&lt;/em&gt;, which is very similar to the Hurst exponent. The main difference is that DFA can be used for non-stationary processes (whose mean and/or variance change over time).&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-python"&gt;import nolds
import numpy as np

rwalk = np.cumsum(np.random.random(1000))
h = nolds.dfa(rwalk)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Nolds supports Python 2 (&amp;gt;= 2.7) and 3 (&amp;gt;= 3.4) from one code source. It requires the package &lt;a href="http://numpy.scipy.org/"&gt;numpy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;These are the only hard requirements, but some functions will need other packages:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;If you want to use the RANSAC algorithm for line fitting, you will also need the package &lt;a href="http://scikit-learn.org/stable/"&gt;sklearn&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;For the true random numbers generated by &lt;code&gt;nolds.qrandom&lt;/code&gt; you need the package &lt;a href="https://pypi.python.org/pypi/quantumrandom/1.9.0"&gt;quantumrandom&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;The plotting functions in &lt;code&gt;nolds.examples&lt;/code&gt; require the package &lt;a href="https://matplotlib.org/"&gt;matplotlib&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Nolds is available through PyPI and can be installed using pip:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-bash"&gt;pip install nolds&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can test your installation by running some sample code with:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-bash"&gt;python -m nolds.examples lyapunov-logistic&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Alternatively, if you do not have &lt;a href="https://matplotlib.org/"&gt;matplotlib&lt;/a&gt; installed, you can run the unittests with:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-bash"&gt;python -m unittest nolds.test_measures&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you only have the download from this Zenodo publication available, you can unzip the archive and run the following command inside the folder:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-bash"&gt;python setup.py install&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Documentation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Nolds is designed as a learning resource for the measures mentioned above. Therefore the corresponding functions feature extensive documentation that not only explains the interface but also the algorithm used and points the user to additional reference code and papers. The documentation can be found in the code, but it is also available as &lt;a href="https://cschoel.github.io/nolds/"&gt;HTML-Version&lt;/a&gt; and on &lt;a href="http://nolds.readthedocs.io/"&gt;Read the Docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The relevant measures can be found in the file &lt;code&gt;nolds/measures.py&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contact information&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have any questions, suggestions or corrections, you can find my current email address in &lt;a href="https://orcid.org/0000-0001-8627-0594"&gt;my ORCID record&lt;/a&gt;.&lt;/p&gt;</description>
  </descriptions>
</resource>
500
14
views
downloads
All versions This version
Views 500500
Downloads 1414
Data volume 1.2 MB1.2 MB
Unique views 442442
Unique downloads 1414

Share

Cite as