Open kahaaga opened 8 months ago
rng should be a field of the encoding. it doesn't have to be a field of OrdinalPatterns
, only give as an input to it.
will not give reproducible results
Note that this is only a problem if there are duplicate datapoints in the timeseries.
Note that this is only a problem if there are duplicate datapoints in the timeseries.
The problem occurs if there are tied values inside any state vector, since it is the individual state vectors that are sorted to map them onto an ordinal pattern.
Currently, the
isless_rand
function, which we use as the default value comparator forOrdinalPatternEncoding
, will not give reproducible results. This is because we don't provide anrng
argument to therand
call.To solve this, we could either:
lt
function, taking care of reproducibility themselves (not preferable IMHO)rng
as a field to bothOrdinalPatternEncoding
andOrdinalPatterns
, which gets passed on toisless_rand
.Or maybe there's a better way?