 Thank you so much. Hi everyone. I am Davide Torres from CISDIC and the first David from CISDIC that you will see in this lighting talks By the way, we are hiring if you are called David. Maybe you have a chance And okay, we'll talk about easy anomaly detection a little bit of an introduction actually early in the morning you're made an amazing presentation about anomaly detection and actually this can be seen as a continuation from that because First time that you see anomaly detection. It is like when you learn how to use a hammer Everything seems like a nail and it's not like that. You have to learn and know when to use them and for what? so let's start Let's first See what is an anomaly to learn if something is an anomaly to have to compare that with something and To be able to model that we will use a little bit of a statistics We'll make a simplification. This is like, okay, let's consider an spherical call Okay, let's consider our data to fit on a standard normal Distribution But these have some advantages and they are that normal distribution Have the property that we know that in the range of average minus plus standard deviation We have approximately 70% of the samples and if you go further to twice the standard deviation from the Average we have 95% of the data So even there is a seed score that it is how far is data from the average Measured in standard deviation. So this way we have a way to calculate if a value that we are Evaluating is an anomaly or is this something normal? So let's get to the work First we will see How to calculate something anomalous in a group. This is an easy example Let's imagine we have a lot of temperature sensors and one of them is getting crazy But how do we know it is crazy or not? Where is the point? well Procure is giving us already the functions to do that and actually in beyond presentation We saw already as naps all of these we are using average function and standard deviation and we know that Using this actually you see the blue part of the expression is getting that part of the anomalies and The orange part of the expression is taking the another the bottom part of the anomalies. This is easy But what if we don't have other group of similar samples or sensors or time series to compare with? Well, maybe we can compare things with what happened before so maybe with this an anomaly if we know that our Time series is a smooth and suddenly there is a peak or a valley and we can say okay Let's compare with the last five minutes or the last hour or the last week From Q already has functions for this. We have the average over whatever or Here we have the average over time and we have the standard deviation over time and Adjusting the window we can use them to say okay. If the value that I am Trying to figure out if it is an anomaly or not It's over the standard deviation of the last five minutes plus the standard deviation X times or The contrary for the bottom part. Maybe this is an anomaly and maybe it is worth investigating but This is okay If I am looking for external temperature for example something I know it will always be smooth But what happened in normal life normal life? We have batch processes We have things that happen every week every hour every day So maybe this peak is not an anomaly. Maybe I can discover that this happens before Let's see how we treat seasonality The trick is that we have to take the spans of seasons and we have to take The previous one to the future to the present time and the another one again back to the future and so on We can do this with the offset function But there is a problem if we only use the offset function We are still having the same time series who will have duplicated data in the same time series So here's the black magic. We are using the label replace to add another Extra label artificial one so they are not the same time series and then suddenly I don't have one time series But I have a lot time series and I can use the same trick down before I have a group Group anomaly detection like we saw before so I can say okay if I can make the average of the previous thing that we saw Plus twice a standard deviation whatever then I'm setting up this Red limit that you are seeing there Last There are some scenarios. They are not common, but sometimes you can do that Where you can make or you have a function correlation function that can predict a value according to another time series For example in case of the energy consumed by a building in a far is a function of the external temperature So, you know if outside you have 25 degrees the building should consume x kilo kilowatts If not, we have a problem. So you can model this directly in prompt QL You can write the Correlation function plus the error or a correlation find some minus the error to have the bottom limit Just check if it is outside or not this safe band Okay, that's all. Thank you so much