Visibility Graphs and Partial Visibility Curves of Time Series

Maps time series into complex networks with the natural visibility algorithm of Lacasa et al. (2008) and the horizontal visibility algorithm of Luque et al. (2009) , using fast exact algorithms. Provides degree statistics, exact results for uncorrelated and periodic series, Feigenbaum graphs (Luque et al., 2011) , time irreversibility, sequential visibility motifs and plotting tools. It also implements the basins of visibility, the total visibility number and the partial visibility curve of Nuño and Muñoz (2020) , computed with a genetic algorithm, a greedy heuristic or an exact integer linear programming formulation, together with the analytical partial visibility curves of the period doubling cascades of the logistic map.


tsvisibility

Natural and horizontal visibility graphs of time series, their classical exact results, and the basins of visibility, total visibility number and partial visibility curves introduced by Nuño and Muñoz (2020).

Installation

# from CRAN (once accepted)
install.packages("tsvisibility")
# development version from a local source
install.packages("tsvisibility_0.1.0.tar.gz", repos = NULL, type = "source")

Example

library(tsvisibility)

x <- logistic_series(r = 4, n = 2000, x0 = 0.2)
g <- vgraph(x, type = "horizontal")
g
hvg_lambda(g)$lambda          # < log(3/2): chaos
visibility_irreversibility(g) # > 0: irreversible

# partial visibility curve of the period-4 orbit
y <- logistic_series(logistic_superstable(2), 48, x0 = 0.3)
cv <- partial_visibility_curve(y, method = "exact")   # needs lpSolve
plot(cv); lines(pvc_theoretical(2), col = "red")
pvc_theoretical_length(Inf)   # 1.0414387863956818

Main functions

Group Functions
Graphs vgraph(), visibility_edges(), visibility_matrix(), vgraph_to_igraph(), plot_visibility()
Degrees visibility_degree(), degree_distribution(), degree_entropy(), hvg_lambda(), visibility_irreversibility(), visibility_motifs()
Exact results hvg_degree_iid(), hvg_mean_degree_periodic(), feigenbaum_degree_distribution()
Basins basin_point(), basin_set(), visibility_point(), visibility_set(), visibility_distribution(), max_visibility_point(), greatest_basin_point()
Partial visibility total_visibility(), partial_visibility_set(), partial_visibility_curve(), pvc_length(), pvc_theoretical(), pvc_theoretical_length()
Logistic map logistic_series(), logistic_superstable(), feigenbaum_constants()

References

  • Lacasa, L., Luque, B., Ballesteros, F., Luque, J. and Nuño, J. C. (2008). From time series to complex networks: the visibility graph. PNAS, 105, 4972–4975. doi:10.1073/pnas.0709247105
  • Luque, B., Lacasa, L., Ballesteros, F. and Luque, J. (2009). Horizontal visibility graphs: exact results for random time series. Phys. Rev. E, 80, 046103. doi:10.1103/PhysRevE.80.046103
  • Nuño, J. C. and Muñoz, F. J. (2020). The partial visibility curve of the Feigenbaum cascade to chaos. Chaos, Solitons & Fractals, 131, 109537. doi:10.1016/j.chaos.2019.109537

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("tsvisibility")

0.1.0 by Francisco J. Muñoz, a day ago


Browse source code at https://github.com/cran/tsvisibility


Authors: Francisco J. Muñoz [aut, cre] (ORCID: , Juan Carlos Nuño [aut]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports graphics, stats

Suggests igraph, Matrix, lpSolve, knitr, rmarkdown, testthat


See at CRAN