Search⌘ K
AI Features

Anomaly Detection with PyCaret

Explore the fundamentals of anomaly detection with PyCaret, focusing on identifying outliers using unsupervised methods such as the local outlier factor. Understand dataset preparation, model training, evaluation, and visualization using the Wholesale Customers dataset to apply practical techniques for finding anomalies in data.

Anomaly detection is one of the main tasks in unsupervised machine learning. Its goal is to identify dataset instances that differ significantly from the majority. Those instances are known as outliers. There are various incentives to detect them depending on the context and domain of each application. There are also semi-supervised and fully supervised methods for anomaly detection, but we’ll focus on the unsupervised approach. Local outlier factor is one of the main anomaly detection models defined in the following equation.

LOFk(A)=BNk(A)lrdk(B)lrdk(A)Nk(A)\text{LOF}_{k}(A)=\frac{\sum_{B\in N_k(A) \frac{\text{lrd}_{k}(B)}{\text{lrd}_{k}(A)}}}{|N_{k}(A)|} ...