https://github.com/jmrozanec/ts2g2

Generate graphs from time series and time series from graphs.

https://github.com/jmrozanec/ts2g2

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 10 DOI reference(s) in README
  • Academic publication links
    Links to: springer.com, nature.com, aps.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.2%) to scientific vocabulary

Keywords

graph-algorithms graphs machine-learning time-series
Last synced: 5 months ago · JSON representation

Repository

Generate graphs from time series and time series from graphs.

Basic Info
  • Host: GitHub
  • Owner: jmrozanec
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage: https://timeseriestographs.com
  • Size: 11.5 MB
Statistics
  • Stars: 1
  • Watchers: 3
  • Forks: 7
  • Open Issues: 0
  • Releases: 0
Topics
graph-algorithms graphs machine-learning time-series
Created almost 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

ts2g2

TS2G2 stands for "timeseries to graphs and back". The library implements a variety of strategies to convert timeseries into graphs, and convert graphs into sequences.

stream = TimeseriesArrayStream([2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3])
timeseries = Timeseries(stream)
g = timeseries.to_graph(NaturalVisibilityGraphStrategy())
sequence = g.to_sequence(RandomWalkSequenceGenerationStrategy(), sequence_length=500)

For a more detailed example, look at the Amazon stocks demo.

Many of the methods implemented in this library are described in Silva, Vanessa Freitas, et al. "Time series analysis via network science: Concepts and algorithms." Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery 11.3 (2021): e1404. Nevertheless, the library also includes additional techniques found in other works from the scientific literature.

This package is being developed as part of the Graph-Massivizer project. The package is a joint effort between the Jožef Stefan Institute, the University of Twente, the Vrije Universiteit Amsterdam, the University of Klagenfurt, the University of Bologna, and Peracton.

Timeseries to graph conversion

Implemented features

# Visibility Graph Graph type Constraints
Undirected Directed Weighted
Penetration Angle
1 Natural Visibility Graph X X X X X
2 Horizontal Visibility Graph X X X X X
3 Difference Visibility Graph

References table

# Visibility Graph Graph type Constraints
Undirected Directed Weighted
Penetration Angle
1 Natural Visibility Graph ref ref ref ref, ref
2 Horizontal Visibility Graph ref ref ref ref, ref
3 Difference Visibility Graph

Graphs to timeseries conversion

Graphs are converted back to timeseries by sampling node values from the graph following different strategies. The following strategies have been implemented so far:

  • random node
  • random node neighbour
  • random node degree
  • random walk
  • random walk with restart
  • random walk with jump

Publications

When using this work for research purposes, we would appreciate it if the following references could be included:

Below we provide a curated list of papers related to our research in this area:

Owner

  • Name: jmrozanec
  • Login: jmrozanec
  • Kind: user
  • Company: qlector

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 63
  • Total Committers: 3
  • Avg Commits per committer: 21.0
  • Development Distribution Score (DDS): 0.397
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jože Rožanec j****c@g****m 38
Žan Grčar g****1@g****m 13
Ivana Ristovska i****7@g****m 12

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 hour
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 hour
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • jmrozanec (2)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • Jinja2 ==3.1.2
  • MarkupSafe ==2.1.2
  • PyYAML ==6.0
  • Pygments ==2.15.1
  • QtPy ==2.3.1
  • Send2Trash ==1.8.2
  • anyio ==3.6.2
  • appnope ==0.1.3
  • argon2-cffi ==21.3.0
  • argon2-cffi-bindings ==21.2.0
  • arrow ==1.2.3
  • asttokens ==2.2.1
  • attrs ==23.1.0
  • backcall ==0.2.0
  • beautifulsoup4 ==4.12.2
  • bleach ==6.0.0
  • cffi ==1.15.1
  • comm ==0.1.3
  • debugpy ==1.6.7
  • decorator ==5.1.1
  • defusedxml ==0.7.1
  • executing ==1.2.0
  • fastjsonschema ==2.16.3
  • fqdn ==1.5.1
  • idna ==3.4
  • importlib-metadata ==6.6.0
  • ipykernel ==6.23.1
  • ipython ==8.13.2
  • ipython-genutils ==0.2.0
  • ipywidgets ==8.0.6
  • isoduration ==20.11.0
  • jedi ==0.18.2
  • jsonpointer ==2.3
  • jsonschema ==4.17.3
  • jupyter ==1.0.0
  • jupyter-client ==8.2.0
  • jupyter-console ==6.6.3
  • jupyter-core ==5.3.0
  • jupyter-events ==0.6.3
  • jupyter-server ==2.5.0
  • jupyter-server-terminals ==0.4.4
  • jupyterlab-pygments ==0.2.2
  • jupyterlab-widgets ==3.0.7
  • matplotlib-inline ==0.1.6
  • mistune ==2.0.5
  • nbclassic ==1.0.0
  • nbclient ==0.7.4
  • nbconvert ==7.4.0
  • nbformat ==5.8.0
  • nest-asyncio ==1.5.6
  • networkx ==3.2.1
  • notebook ==6.5.4
  • notebook-shim ==0.2.3
  • numpy ==1.24.3
  • packaging ==23.1
  • pandas ==2.0.1
  • pandocfilters ==1.5.0
  • parso ==0.8.3
  • pexpect ==4.8.0
  • pickleshare ==0.7.5
  • platformdirs ==3.5.1
  • prometheus-client ==0.16.0
  • prompt-toolkit ==3.0.38
  • psutil ==5.9.5
  • ptyprocess ==0.7.0
  • pure-eval ==0.2.2
  • pycparser ==2.21
  • pyrsistent ==0.19.3
  • python-dateutil ==2.8.2
  • python-json-logger ==2.0.7
  • pytz ==2023.3
  • pyzmq ==25.0.2
  • qtconsole ==5.4.3
  • rfc3339-validator ==0.1.4
  • rfc3986-validator ==0.1.1
  • six ==1.16.0
  • sniffio ==1.3.0
  • soupsieve ==2.4.1
  • stack-data ==0.6.2
  • terminado ==0.17.1
  • tinycss2 ==1.2.1
  • tornado ==6.3.2
  • traitlets ==5.9.0
  • typing-extensions ==4.5.0
  • tzdata ==2023.3
  • uri-template ==1.2.0
  • wcwidth ==0.2.6
  • webcolors ==1.13
  • webencodings ==0.5.1
  • websocket-client ==1.5.1
  • widgetsnbextension ==4.0.7
  • zipp ==3.15.0
setup.py pypi