Skip to main content

Bring Machine Learning to Your Mendix App with Altair RapidMiner

Bring Machine Learning to Your Mendix App with Altair RapidMiner

Key Takeaways

  • Altair RapidMiner makes machine learning more accessible: Whether you prefer coding in Python, or working visually in Workflow Studio, Altair AI Cloud gives teams the tools to build and deploy ML models quickly.
  • Integrating ML with Mendix is straightforward: With Mendix’s low code capabilities and REST API support, you can easily connect live machine learning predictions to your apps.
  • Predictive maintenance is just the beginning: The same integration approach can be used for customer insights, fraud detection, supply chain optimization, and more.
  • Altair and Mendix work better together: With both platforms under Siemens, the path from data science to deployed app is smoother and faster than ever before.

How Mendix and Altair RapidMiner work together

Want to add real machine learning (ML) power to your Mendix apps? In this post, we’ll show you exactly how to do that by creating and deploying a custom model in Altair AI Cloud before connecting it to your Mendix app so that end users can interact with it in an intuitive way. This end-to-end workflow brings together the best of both worlds: advanced data science on one side, and fast, easy app development on the other.

Bringing Data Science and App Development Together

Usually, software developers and data scientists work in different spaces. Developers use tools like Mendix to build apps quickly with low code. Data scientists, meanwhile, use platforms like Altair AI Cloud to train powerful ML models. Both groups do amazing things, but they don’t always collaborate.

That’s changing – fast. With AI becoming a big deal in every industry, connecting data science and app development is more important than ever. The good news? It’s easier now, especially since Siemens (Mendix’s parent company) brought Altair RapidMiner into the family. Now you can build, deploy, and integrate AI models faster than ever before.

Let’s look at a real example: Predicting equipment failures

To show you how the integration works, we’ll walk through a basic example using a made-up dataset. The goal? Predict when a machine might fail before it actually does so maintenance can happen during planned downtime, not in the middle of production.

Why does this matter? Because when machines fail unexpectedly, it’s expensive and stressful. Being able to predict failures early means companies can save money and avoid delays.

By linking our prediction model to a Mendix app, we can deliver these insights right to the people who need them.

Meet Altair RapidMiner

If you haven’t used Altair RapidMiner yet, here’s the scoop: it’s a platform where you can easily build machine learning models or even create GenAI agents. Like Mendix, Altair RapidMiner supports both no-code/low-code development (through their drag-and-drop Workflow Studio), and full-code environments like VS Code or Jupyter Notebook. So, whether you’re a Python pro or just getting started, Altair RapidMiner makes collaboration easier between data experts and domain experts.

To guide our integration, the diagram below shows the ML integration framework we’ll be using throughout this post. It maps out how data moves between systems – from building the model to delivering insights to end users – and helps set the stage for the technical details we’ll dive into next. For this blog, we narrowed the focus a bit to highlight specific capabilities within Altair RapidMiner.

We chose to build our model in Python to show the flexibility of the platform. That said, we could have used RapidMiner’s Auto Machine Learning features in the Workflow Studio to create a more advanced model even faster. With Auto ML or Auto AI, we could have handled everything from feature analysis and model comparison to hyperparameter tuning and ensemble modeling all with minimal coding, and without sacrificing transparency in how the predictions work.

Step 1: Build the model

We started with a synthetic dataset filled with historical sensor readings from industrial equipment – including temperature, vibration, pressure, and operational parameters. Using at Jupyter Notebook hosted in Altair AI Cloud, we cleaned the data, handled missing values, and ensured everything was in the same format. Then we created new features that help spot early warning signs of failure.

Next, we tested a few different algorithms and landed on Random Forest as our algorithm of choice as it performs well with sensor data and can handle the complex relationships between equipment conditions and failure events. In our case, the model delivered excellent results, achieving a near-perfect ROC AUC score thanks in part to the clean, synthetic dataset. It clearly showed the model’s ability to distinguish between normal operation and potential failures.

Quick tip: If you’d rather not code, Altair RapidMiner’s Workflow Studio includes built-in tools to analyze, normalize, and build an ML model.

Step 2: Prepare the model for deployment

Once we had our model trained, we needed to make it available for use. To do that, we saved the model as a file, then used a short Python script to upload it to the RapidMiner Data Catalog so it could be used in our deployment workflow.
Here’s what that looked like:

import rmpy

import os

# Assume LOCAL_MODEL_PATH is defined and the file exists, e.g.:

# LOCAL_MODEL_PATH = "predictive_maintenance_model.joblib"

rmpy.data.upload(LOCAL_MODEL_PATH)

# Optional: Verify upload

rmpy.data.show_list()

 

Step 3: Deploy as a REST API

Now that we were done playing around in Jupyter (notebooks), it was time to come back down to earth and put our model into production.

To do this, we moved to Workflow Studio. Here, creating a workflow for deployment is refreshingly straightforward. Simply drop three operators into the workflow and we are ready to move to the next stage:

  • Input operator – to feed in data (such as our Mendix data)
  • Execute Python operator – to call back the model we previously saved in the data catalog
  • Output operator for the results

Next, we navigated to the deployment section. To make the model accessible, we chose the REST API deployment type, connected it to the workflow containing our model, and voilà – it was time to deploy! Now we had a live API that Mendix could talk to – basically a bridge between the data science world and the app world.

Did you know? Atlair AI Cloud handles all the complex infrastructure work behind the scenes, allowing you to focus on the value the predictions will bring.

Step 4: Connect the API to your Mendix app

With the REST API and the API Key in hand, connecting to Mendix is easy.

Inside your Mendix module, add a Consume REST Service. From this stage, Mendix works its magic by automatically generating the entities based on the API’s request and response structure, reducing manual mapping work. Additionally, it allows you to immediately test your integration by providing sample parameter values directly in the Mendix interface as seen below.

For our predictive maintenance use case, we needed to translate the model’s binary outputs into actionable information. This transformation happens in a microflow, where we convert:

  • Prediction value “1” into “WARNING: Equipment failure likely within 48 hours!”
  • Prediction value “0” into “Equipment operating normally.”

From there you can style your page however you want. Build a dashboard, show alerts, highlight machine health – you name it. And just like that, it’s done. End users can now check predictions or even add their own inputs right inside the app.

Ready to try it?

As you can see, connecting Altair RapidMiner ML models to your Mendix apps doesn’t have to be complicated. In fact, it’s pretty fun. So, what would you build with this kind of AI integration?

 

Choose your language