
Memory-cell recurrence c_t = f(c_prev, x_t) (Geron Ch 13, morie.fn hmmcel)
Source:R/geron_w4b_native.R
morie_geron_memory_cell.RdMemory-cell recurrence c_t = f(c_prev, x_t) (Geron Ch 13, morie.fn hmmcel)
Examples
leaky <- function(c, x) 0.5 * c + x
x <- matrix(0:15, nrow = 4, byrow = TRUE)
morie_geron_memory_cell(c(2, 4), c(1, 1), leaky)
#> $c_t
#> [1] 2 3
#>
#> $states
#> [,1] [,2]
#> [1,] 2 3
#>
#> $deltas
#> [1] 1
#>
#> $n_steps
#> [1] 1
#>
#> $estimate
#> [1] 3.605551
#>
#> $n
#> [1] 2
#>
#> $method
#> [1] "Memory-cell recurrence c_t = f(c_{t-1}, x_t)"
#>