Skip to main content

Cycle Detection in Time Series (CyDeTS). An algorithm to detect cycles in times series along with their respective depth of cycle and duration.

Project description

https://coveralls.io/repos/github/oemof/cydets/badge.svg?branch=master https://travis-ci.org/oemof/cydets.svg?branch=master https://badge.fury.io/py/cydets.svg https://zenodo.org/badge/DOI/10.5281/zenodo.2625698.svg

This package implements an algorithm to detect cycles in a times series along with their respective depth-of-cycle (DoC) and duration. It is maintained as a standalone package within the Open Energy Modelling Framework. The acronym CyDeTS stands for (Cy)cle (De)tection in (T)ime (S)eries and is chosen to prevent confusions with cycle definitions from graph theory.

Algorithmic results have been tested against the well known rainflow cycle counting (RFC) method from mechanical engineering and the equivalence of both counting methods has been proved. The original algorithm has been developed and proposed within the following publication:

Dambrowski, Jonny; Pichlmaier, Simon & Jossen, Andreas. Mathematical methods for classification of state-of-charge time series for cycle lifetime prediction. Advanced Automotive Battery Conference. Mainz, Germany. 2012.

Thanks again to Simon Pichlmaier for sharing his code and allowing us to port and publish the algorithm under a free license.

Documentation

The probably most extensive description of the algorithm can be found in the abovementioned paper. In addition, we have tried to document the single parts of the algorithm as docstrings within the code.

Installation

If you have a working Python3 environment, use can pypi to install the latest version.

pip install cydets

Usage

The algorithm is implemented as a function which takes an array-like data structure as argument. Results are returned as a pandas dataframe.

import pandas as pd
from cydets.algorithm import detect_cycles

# create sample data
series = pd.Series([0, 1, 0, 0.5, 0, 1, 0, 0.5, 0, 1, 0])

# detect cycles
cycles = detect_cycles(series)

Citation

Please use our entry on Zenodo to refer a specific version

License

Copyright (C) 2019 oemof developing group

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cydets-1.1.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file cydets-1.1.tar.gz.

File metadata

  • Download URL: cydets-1.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.9.0 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/2.7.15rc1

File hashes

Hashes for cydets-1.1.tar.gz
Algorithm Hash digest
SHA256 71c22af86554d8058d424b45743f844009194be76f0455af9c8d6bbf6a0dbf29
MD5 38cb1ea9ee55dddda9eebe1af3aedf70
BLAKE2b-256 c2d3b80e2e14bd737fa282bab550b07efa9824533189b35f89059715eacc833a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page