I’m looking through the ei_classifier_smooth_update() definition (in ei_classifier_smooth.h), as a student is asking about this function. I’d like to make sure I understand what it’s doing.
From what I can tell, the function looks at the previous 10 inferences. If a label has the highest score over classifier_confidence (e.g. 0.8) min_readings_same (e.g. 7) out of n_readings (e.g. 10), it will be returned as the chosen label (otherwise, you’ll get “unknown”).
I haven’t tried it yet myself but I do understand the same from the code than what you’ve just explained.
As a return you will get either the label, uncertain or anomaly:
Is the moving average filter a separate part of the same ei_classifier_smooth_update() function? I’m not seeing it if so. Or are you referring to the part where it requires e.g. 7 out of the previous 10 readings to be above a threshold?