-
Notifications
You must be signed in to change notification settings - Fork 75
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
TM anomaly: new modes: likelihood,... #588
Conversation
ANMODE {DISABLED, RAW, LIKELIHOOD, LOGLIKELIHOOD}
struct anomaly_tm needed be known before the TM.anomaly& is used. Surprisingly this compiled well, but resulted in segfault
Ping.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me!
Hopefully this change will make it easier to use the TM.
/* | ||
* anomaly score computed for the current inputs | ||
* (auto-updates after each call to TM::compute()) | ||
* | ||
* @return a float value from computeRawAnomalyScore() | ||
* from Anomaly.hpp | ||
*/ | ||
const Real &anomaly = anomaly_; | ||
const Real &anomaly = tmAnomaly_.anomaly_; //this is position dependant, the struct anomaly_tm must be defined before this use, | ||
// otherwise this surprisingly compiles, but a call to `tmAnomaly_.anomaly` segfaults! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, Interesting ...
This seems like a problem with the C++ language, or maybe the compiler? Thanks for making note of this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, strange thing, kept me busy for a while. The compiler might be, I've been using g++-9 recently due to the ParallelTS.
Thank you for reviews, I'll now be able to use this code in our NAB detector. |
For #469 , and htm-community/NAB#5
TM.anomaly
ANMode {DISABLED, RAW, LIKELIHOOD, LOGLIKELIHOOD}
and aims to replace code in NAB HTMcore detector