grammify: Create a Grammian Angular Field representation of a time...

Description Usage Arguments Value Examples

View source: R/timeseries.R

Description

This function takes a univariate timeseries and turns it into a Grammian Angular Field which is a 2 dimensional representation of that time series. Typically this could be used by a convulutional neural network to infer properties of the problem and use it in predictive purposes.

Usage

1

Arguments

x

the univariate timeseries to convert

Value

a matrix representing the Grammian Angular Field

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(datools)
x <- sin(1:100)
xg <- grammify(x)
image(xg)

image(grammify(cos(1:100)))
image(grammify(sin(1:100 / 10)))
image(grammify(tanh(-50:50 / 20)))

x <- (seq(-100, 100, length.out = 100) / 10)^2 + rnorm(100, 0, 10)
image(grammify(x))

DoktorMike/datools documentation built on Feb. 28, 2021, 8:39 a.m.