arundo / adtk

A Python toolkit for rule-based/unsupervised anomaly detection in time series
https://adtk.readthedocs.io
Mozilla Public License 2.0
1.06k stars 143 forks source link

Question: How to simulate a "NotAggregator" in pipenet? #117

Open numericOverflow opened 3 years ago

numericOverflow commented 3 years ago

I've got data that I'd like to exclude from anomaly label if certain criteria are met (like a list of supervised labels for excluding incorrectly detected anomalies), regardless of the other detector results. I thought I'd implement it as a separate detector in a pipenet, then aggregate the results.

This would allow me to override other detectors with an aggregation, but can't come up with a way to do so with the two existing aggregators (And/Or) so would need a "NotAggregator".

Does this make sense, or has anyone tried something like this in the past?

Here's an example of what I was thinking the pipenet would look like: ADTK_example_notAggregator_pipenet

tailaiw commented 3 years ago

"and" and "or" are operators applied to two input and returning one "aggregated" output. "not" is a 1-to-1 operator, which is a "transformer" in the context of adtk instead of an "aggregator". CustomizedTransformer1D should be able to do that.