szhan / pyrqa

Recurrence Quantification Analysis of Large-Scale Time Series

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example code doesn't work

lngdet opened this issue · comments

Whey I run the exact code given under the Usage section of the README (see below), i get an error:

>>> from pyrqa.settings import Settings
>>> from pyrqa.neighbourhood import FixedRadius
>>> from pyrqa.metric import EuclideanMetric
>>> from pyrqa.computation import RQAComputation
>>> time_series = [0.1, 0.5, 0.3, 1.7, 0.8, 2.4, 0.6, 1.2, 1.4, 2.1, 0.8]
>>> settings = Settings(time_series,
                        embedding_dimension=3,
                        time_delay=1,
                        neighbourhood=FixedRadius(1.0),
                        similarity_measure=EuclideanMetric,
                        theiler_corrector=1,
                        min_diagonal_line_length=2,
                        min_vertical_line_length=2,
                        min_white_vertical_line_length=2)
>>> computation = RQAComputation.create(settings, verbose=True)
>>> result = computation.run()
>>> print result

I get this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[137], line 1
----> 1 settings = Settings(time_series,
      2                         embedding_dimension=3,
      3                         time_delay=1,
      4                         neighbourhood=FixedRadius(1.0),
      5                         similarity_measure=EuclideanMetric,
      6                         theiler_corrector=1,
      7                         min_diagonal_line_length=2,
      8                         min_vertical_line_length=2,
      9                         min_white_vertical_line_length=2)

TypeError: Settings.__init__() got an unexpected keyword argument 'embedding_dimension'

The version of pyrqa i'm using is: 8.1.0, installed using pip install pyrqa==8.1.0