Open jomulder opened 1 year ago
Hi Joris,
Do you maybe have an example function you would like this to work for?
Hi Marlyne, well, the exponential decay function is already an example, so
weight_exp <- function(time,value){
log(2)/value * exp(-time*log(2)/value)
}
but another one (which is not yet implemented) could be
weight_power4 <- function(time,value){
(time/value-1)^4 * (time<value)
}
which would decay in an exponential type fashion but it would be 0 after time=1 has passed. Possibly, the function should have the argument end
as well to indicate if the weight is zero after a certain time point. So for the exponential decay function, it would be that end=Inf
, and for the second power4 decay it would be that end=1
(then the * (time<1)
part could be omitted, which is less trivial I guess).
I talked about these alternative shapes with Giuseppe some time ago.
Best, Joris
An argument memory = "function" where the memory_value argument would be any function that only depends on the time that has passed would be useful. Then users can specify their own memory function which is interesting because many different choices can be made. Possibly it would be useful that there is also an argument then that the says when the function is 0 because some functions may be zero at some point (such as a linear decay) and then we want to avoid commuting zero's many times for events that happened longer ago.