Pattern Matching and Outliers

GitHub Repo

Google Colab

Pattern matching on sensor data is a crucial task in various manufacturing scenarios, such as quality control, process optimization, and predictive maintenance. In this example, we walk through a straightforward approach to conduct pattern matching on time series manufacturing data using similarity search in KDB.AI, a vector database. This approach allows us to identify and retrieve historical time series that exhibit specific patterns without the need for complex modeling or domain-specific expertise.

We begin by loading sensor data from a dataset, cleaning it, and then create sensor vector embeddings by dividing the time series data into overlapping windows and normalizing the data within each window. These embeddings are stored in a KDB.AI table, which is a vector database designed for efficient similarity searches.

To demonstrate pattern matching, we select an example pattern from the data and search for similar sequences in the KDB.AI table. We visualize these matches on a time series chart, allowing us to compare and analyze the patterns found.

This sample exercise illustrates how a simple yet effective approach to pattern matching on sensor data can yield satisfactory results, making it valuable for various manufacturing applications.

Download the Jupyter Notebook and any accompanying files at the repository on GitHub.