Iot Predictive Analytics
Method for Predicting failures in Equipment using Sensor data. Sensors mounted on devices like IoT devices, Automated manufacturing like Robot arms, Process monitoring and Control equipment etc., collect and transmit data on a continuous basis which is Time stamped.
Install / Use
npx skills add IBM/iot-predictive-analyticsInstalls into whichever agent you are using.
README
Equipment Failure Prediction using IoT Sensor data
Data Science Experience is now Watson Studio. Although some images in this code pattern may show the service as Data Science Experience, the steps and processes will still work.
This IBM Pattern is intended for anyone who wants to experiment, learn, enhance and implement a new method for Predicting Equipment failure using IoT Sensor data. Sensors mounted on devices like IoT devices, Automated manufacturing like Robot arms, Process monitoring and Control equipment etc., collect and transmit data on a continuous basis which is Time stamped.
The first step would be to identify if there is any substantial shift in the performance of the system using Time series data generated by a single IoT sensor. For a detailed flow on this topic, you can refer to the Change Point detection IBM Pattern. Once, a Change point is detected in one key operating parameter of the IoT equipment, then it makes sense to follow it up with a Test to predict if this recent shift will result in a failure of an equipment. This Pattern is an end to end walk through of a Prediction methodology that utilizes multivariate IoT data to predict any failure of an equipment. Bivariate prediction algorithm – Logistic Regression is used to implement this Prediction. Predictive packages in Python 2.0 software is used in this Pattern with sample Sensor data loaded into the Data Science experience cloud.
All the intermediary steps are modularized and all code open sourced to enable developers to use / modify the modules / sub-modules as they see fit for their specific application
When you have completed this pattern, you will understand how to
- Read IoT Sensor data stored in the Data base
- Configure the features and target variables for Prediction model
- Split the multivariate data into Train and Test datasets by configuring the ratio
- Train the model using Logistic Regression and measure the Prediction accuracy
- Score the Test data and measure Prediction accuracy
- Evaluate the Model’s Predictive performance further by computing a Confusion matrix
- Rerun experiments by changing the configuration parameters

Steps:
- User signs up for IBM Watson Studio
- User loads the sample IoT sensor Time series data to database
- A configuration file holds all the key parameters for running the IoT Time series prediction algorithm
- The prediction algorithm written in Python 2.0 Jupyter notebook uses the Configuration parameters and Sensor data from DB
- Python Notebook runs on Spark in IBM Watson Studio to ensure performance and scalability
- The outputs of the prediction algorithm is saved in Object storage for consumption
Developers can reuse all components that support the above steps like
- Reading IoT Sensor data from DB
- Function to split Test and Train datasets, Build Logistic Regression models, Score models, Compute accuracy metrics like Confusion matrix
- User configurable features and target variables for Predicting equipment failures, Test and Train data sets
- Computations of key statistics that help evaluate the Predictive capability of the models
- Repeat the experiment by altering the Configuration parameters by rerunning the models
Included Components
- IBM Watson Studio: Analyze data using Python, Jupyter Notebook and RStudio in a configured, collaborative environment that includes IBM value-adds, such as managed Spark.
- DB2 Warehouse on cloud: IBM Db2 Warehouse on Cloud is a fully-managed, enterprise-class, cloud data warehouse service. Powered by IBM BLU Acceleration.
- IBM Cloud Object Storage: An IBM Cloud service that provides an unstructured cloud data store to build and deliver cost effective apps and services with high reliability and fast speed to market.
Featured Technologies
- Analytics: Finding patterns in data to derive information.
- Data Science:Systems and scientific methods to analyze structured and unstructured data in order to extract knowledge and insights.
Watch the Video
Steps
Follow these steps to setup and run this IBM Code Pattern. The steps are described in detail below.
- Sign up for Watson Studio
- Create IBM Cloud services
- Create the Jupyter notebook
- Add the data and configuraton file
- Run the notebook
- View the results
1. Sign up for Watson Studio
Sign up for IBM's Watson Studio. By signing up for Watson Studio, an Object Storage service will be created in your IBM Cloud account.

2. Create IBM Cloud services
2.1 Download sample data
Download the sample data file from github and store it in your a local folder. This will be used to upload to database in the next steps.
Once you are familiar with the entire flow of this Pattern, you can use your own data for analysis. But ensure that your data format is exactly same as provided in the sample data file.
2.2 Create a DB2 Warehouse on IBM Cloud
If you are not already familiar with how to create, access data from data store in Watson Studio, get yourself familiarised by following this documentation. Add data to project
Topics related to Data creation and access that will be specifically helpful in this Pattern are as below:
i. Click on DB2 Warehouse on Cloud service in the IBM Cloud Dashboard. Click Open to launch the Dashboard.
DB2 Warehouse on Cloud

Note: Data will loaded into a DB2 database instead of reading directly from the .csv file. This is done to ensure end to end consistency of solution architecture when combined with other IoT IBM Patterns.
ii. Choose an appropriate name for the DB2 Warehouse Service Name and choose Free Pricing Plan. Click on Create.

iii. Click on DB2 Warehouse on cloud instance on IBM Cloud Dashboard. You must be able to see the DB2 Warehouse service you created in the previous step. Click on the service name from the list. Once you are in the Service details page, click on Open button.

iv. Load data which is downloaded in step 5.2.1 into a DB2 Warehouse table by selecting the sample data from My Computer -> browse files.

v. Click on Next from the panel, choose schema and then create a New Table.

- The screenshot above shows
DASH100002as the Schema name. Select an appropriate schema name for which you have read / write access - It is important to specify the name of the DB2 table as IOT_SENSOR_DATA, as it will be referred in Data science experience to read data from in later steps
2.3 Create DB2 Warehouse Connection in Watson Studio
We need to link the data we just uploaded into the DB2 Warehouse database with Watson Studio in order to run the analysis.
Below are the steps to add a connection to access the data in Watson Studio Python Jupyter notebook.
i. Navigate to Watson Studio Project -> ViewAll Project -> pick your project
ii. Choose Data Services -> Connections menu
iii. Click on the Create Connection button

iv. Give a name for your Watson Studio Data connection
v. Choose Service instance as the name of the DB2 warehouse service name you created earlier and Click Create

vi. Navigate back to Project -> ViewAll Project -> pick your project
vii. Click on the Find and add data icon 1010 on top right
viii. Click on Connection tab the check box next to the DB2 warehouse Data connection you just created and click Apply
ix. Now the new connection is added to your Watson Studio IoT Predictive project

3. Create the Jupyter notebook
First create a new project in Watson Studio. Follow the detailed steps provided in the IBM online documentation for Watson Studio Project creation, or watch a video on using Watson Studio to create a project.
In Watson Studio:
Use the menu on the top to select Projects and then Default Project.
Click on Add notebooks (upper right) to create a notebook.
- Select the
From URLtab. - Enter a name fo
Related Skills
dbx
13.7k20 MB lightweight cross-platform database client for 70+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker.
product
Cloud-agnostic Kubernetes infrastructure with Terraform & Helm for homelabs, edge, and production clusters.
ghidra-mcp
3.2kGhidra MCP Server — 200+ MCP tools for AI-powered reverse engineering. GUI plugin + headless server, lazy tool loading, convention enforcement, batch operations, Ghidra Server integration, and Docker deployment.
radar
2.8kThe missing open-source Kubernetes UI with a built-in MCP server for AI agents. See what's broken, why, and what changed. Issues, Topology, event timeline, Helm, GitOps, live service traffic, and cluster audits - all in one Go binary.

