teda_r {teda}R Documentation

Create teda recursive object from observation (+ state)

Description

A recursive method that takes the state variables of previous mean, previous variance, and the current timestep position, along with the current observation. It returns a teda recursive object. Currently only a univariate implementation.

Usage

teda_r(curr_observation, previous_mean = curr_observation, previous_var = 0,
  k = 1, dist_type = "Euclidean")

Arguments

curr_observation

A single observation, the most recent in a series

previous_mean

The mean value returned by the previous call to this function, if no previous calls, default value is used.

previous_var

The variance value returned by the previous call to this function, if no previous calls, default value is used.

k

The count of observations processed by the recursive function, including the current observation

dist_type

A string representing the distance metric to use, default value (and currently only supported value) is "Euclidean"

Details

The function has two intended ways of use: on the first pass, it only takes the observation value as a paramter and the rest are provided by defaults, on all other passes, it takes the current observation, the previous mean and variance values, and the current k (number of observations) which includes the current observation.

On return, the teda recursive object holds:

It provides generic functions for print and summary, at this moment both provide the same outout.

Value

The teda recursive object

References

Bezerra, C.G., Costa, B.S.J., Guedes, L.A. and Angelov, P.P., 2016, May. A new evolving clustering algorithm for online data streams. In Evolving and Adaptive Intelligent Systems (EAIS), 2016 IEEE Conference on (pp. 162-168). IEEE. DOI: 10.1109/EAIS.2016.7502508

See Also

Other TEDA.functions: teda_b

Examples

vec = c(20, 12, 10, 20)
a = teda_r(vec[1])
b = teda_r(vec[2],
           a$curr_mean,
           a$curr_var,
           a$next_k)
c = teda_r(vec[3],
           b$curr_mean,
           b$curr_var,
           b$next_k)

d = teda_r(vec[4],
           c$curr_mean,
           c$curr_var,
           c$next_k)
summary(d)


[Package teda version 0.1.1 Index]