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

Monitor formula to compare two data values #20

Open
lesire opened this issue Feb 5, 2021 · 2 comments
Open

Monitor formula to compare two data values #20

lesire opened this issue Feb 5, 2021 · 2 comments

Comments

@lesire
Copy link

lesire commented Feb 5, 2021

Hi,
I have a time serie that contains two data, let's say 'x' and 'y'. I want to create a monitor that compares these two data. However, it seems that data comparison is not supported.
I tried the following formulas, each time raising a "syntex error" when creating the (discrete) monitor:

  1. "{x > y}"
  2. "{y: *ref, x > *ref}"
  3. "exists[ref]. ({y: *ref, x > *ref})"

also with "implies" relations, nothing works.

Any suggestion?

@doganulus
Copy link
Owner

doganulus commented Feb 14, 2021

You are right. Numerical comparison between two data fields or references are not supported so the parser doesn't accept these formulas. If possible, you can pre-process time-series to insert a Boolean field of "x gt y" to the series and use it as a proposition inside other formulas.

Regarding the rest, such numerical data comparison with references is quite hard due to the symbolic approach chosen in the algorithm. Consider these data references only for categorical variables (string fields only in practice).

And what do you mean exactly by also with "implies" relations, nothing works.? Do you have an example formula you have tried?

@lesire
Copy link
Author

lesire commented Feb 15, 2021

I tried to use implies to solve my comparison problem, like "exists[ref]. {y: *ref} => {x > *ref}".
I can clearly write a function that compaires the values and returns a new bool... I just hoped it was not necessary :)
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants