In the Internet of Things (IoT) world, the sensors send events periodically. This event data is stored, and the data scientist builds machine learning models for actionable insights on the data. The machine learning model can be a prediction model for the equipment parameter going outside of a certain threshhold.
The following scenario is considered for this developer code pattern: In a chemical research plant, the containers with various chemicals under study are required to be maintained within a certain threshold. In our case, the minimum temperature threshold is 27°F, and the maximum is 30°F. If container temperatures are too low or too high, the consequences could be fatal. Hence, swift action must be taken when the container temperature crosses the defined threshold.
This code pattern will cover anomoly detection in IoT event streams using IBM Event Streams and IBM Cloud Pak for Data with a SingleStore database. It will also cover prediction of the container temperatures for future days and detect which day would the container cross the threshold.
Once you complete the code pattern, you will be able to:
- Send IoT events to IBM Event Streams.
- Create SingleStore Kafka pipelines to consume event data from IBM Event Streams and store the data in a SingleStore table inside IBM Cloud Pak for Data.
- Create a machine learning model to predict temperature events on IBM Cloud Pak for Data.
- Create a Cognos dashboard to visualize the insights on IBM Cloud Pak for Data.
- IoT temperature sensors send data to IBM Event Streams.
- Kafka pipelines in SingleStore consume data from IBM Event Streams and store data into tables.
- The AI model takes the sensor data from SingleStore at regular intervals as input. The model forecasts the sensor data, predicts anomalies, and stores back the anomaly data to SingleStore.
- A dashboard is displayed by Cognos using the AI model output in the SingleStore database.
Ready to get started? Check out the README for detailed instructions that explain how to:
- Create an instance of IBM Event Streams
- Note broker URLs
- Create credentials
- Download the SSL certificate from Event Streams
- Upload the certificate to the SingleStore cluster
- Create a database, table, and pipeline
- Clone the repo
- Build and run the application
- Deploy and run the AI model on IBM Cloud Pak for Data
- Create dashboard using IBM Cognos Analytics on IBM Cloud Pak for Data