Compute the evolution of REDI over successive inputs
loop_redi.Rd
Compute the evolution of REDI over successive inputs
Arguments
- data
A tibble or data frame, containing an
Input
column (with the Date format) and anOutput
column. A simple vector of workload values, pre-sorted by chronological order can also be provided.- coef
A number corresponding to the lambda coefficient, controlling the decay of the exponential weights. Default is 0.1.
Value
A tibble similar to data
, containing an additional REDI
column computed over the successive input values.
Examples
data <- simu_db()
loop_redi(data = data, coef = 0.1)
#> # A tibble: 366 × 4
#> Input Output REDI Lambda
#> <date> <dbl> <dbl> <dbl>
#> 1 2023-01-01 NA 50.0 0.1
#> 2 2022-12-31 NA 50.0 0.1
#> 3 2022-12-30 49.2 50.0 0.1
#> 4 2022-12-29 NA 50.2 0.1
#> 5 2022-12-28 47.8 50.2 0.1
#> 6 2022-12-27 NA 50.8 0.1
#> 7 2022-12-26 NA 50.8 0.1
#> 8 2022-12-25 NA 50.8 0.1
#> 9 2022-12-24 52.2 50.8 0.1
#> 10 2022-12-23 48.4 50.5 0.1
#> # ℹ 356 more rows