Great observation! There are a few reasons why this can happen. The two most relevant ones are webhook request failure, and statistical considerations.
In order to display glowfi.sh predictions along with raw sensor data, we send two POSTs to Ubidots. The first POST is data from the initial particle webhook request to glowfi.sh (the raw sensor data), and the second is a POST from the particle hook-response from glowfi.sh (anomaly predictions). If the second request fails, Ubidots linearly interpolates the line graphs (even though data is missing). In the snapshot below, you can see an instance where the temp sensor goes negative (time ~8:56:40) but the anomaly probability stays above the threshold. The reason for this is that the hook-response with the glowfi.sh prediction for that time was not sent to Ubidots (missing data) and Ubidots interpolates the points across the previous and next points…showing no anomaly.
Even though the spikes in the temp sensor are obvious and could be removed quite easily with thresholding, as I mention in my post on despiking, anomaly amplitude and duration generally are not known in advance. Additionally, we are determining anomalies in a multi-variate sense across all sensors. In order to be very general in detecting anomalies, our algorithm uses transformations and normalization (e.g., to handle dynamic range variations across sensors), and multi-variate statistical models to estimate normal behavior across all sensor time-series. If the relationships between the sensor series are ill-behaved, then the anomaly predictions will be less robust. I show a snapshot of the sensor space (3-axes of sensor data for our example) below. The statistical relationship between sensors is multi-modal and this complicates the estimation of anomalies. While this can explain some of the behavior you have observed, we believe it is mostly due to the webhooks issue above.
This being said, I’ll post our success/failure rate for our predictions to this post so everyone can see how well we are doing on average with predicting events.
Thanks for the awesome observation and reply!