Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproducibility for OrdinalPatternEncoding #379

Open
kahaaga opened this issue Jan 13, 2024 · 3 comments
Open

Reproducibility for OrdinalPatternEncoding #379

kahaaga opened this issue Jan 13, 2024 · 3 comments
Labels
discussion-design Discussion or design matters good first issue Good for newcomers

Comments

@kahaaga
Copy link
Member

kahaaga commented Jan 13, 2024

Currently, the isless_rand function, which we use as the default value comparator for OrdinalPatternEncoding, will not give reproducible results. This is because we don't provide an rng argument to the rand call.

To solve this, we could either:

  • Force the user to provide their custom lt function, taking care of reproducibility themselves (not preferable IMHO)
  • Include rng as a field to both OrdinalPatternEncoding and OrdinalPatterns, which gets passed on to isless_rand.

Or maybe there's a better way?

@kahaaga kahaaga added the discussion-design Discussion or design matters label Jan 13, 2024
@Datseris
Copy link
Member

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.

@Datseris Datseris added the good first issue Good for newcomers label Jan 14, 2024
@Datseris
Copy link
Member

will not give reproducible results

Note that this is only a problem if there are duplicate datapoints in the timeseries.

@kahaaga
Copy link
Member Author

kahaaga commented Jan 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion-design Discussion or design matters good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants