Anomaly detection is the identification of rare observations with extreme values that differ drastically from the rest of the data points. These items are called outliers and need to be identified in…