Custom Machine Learning Sensor
By integrating your own machine learning models directly into Celonis automation skills, you can move beyond standard logic and leverage advanced predictive algorithms to drive business actions. The Custom Machine Learning Sensor acts as a bridge between your data science environment and the execution layer of the Celonis Studio.
Using the Machine Learning Workbench, you can deploy custom Python scripts or notebooks that analyze data in real-time. Once configured, these models produce signals based on specific data incidents, allowing you to trigger automated workflows the moment a model identifies a relevant pattern or prediction.
Before configuring a custom machine learning sensor, you need:
A configured Knowledge Model relevant to your use case.
An existing Machine Learning Workbench containing your Python notebook or script.
If using input parameters, ensure your notebook cell has the parameters tag applied.
To configure a custom machine learning sensor:
Select the Sensor Type: In your Skill configuration, add a new sensor and select Machine Learning Sensor from the Celonis Sensors list.
Define the Use Case: In the Use Case dropdown menu, select Custom.
Link your ML Workbench: Choose the workbench where your model is stored.
Directory: Select the specific folder containing your script. Use \ if the script is located in the root directory.
Notebook: Select the exact .ipynb file that contains your solution.
Configure Input Parameters: Map any variables you wish to pass to the script. Ensure the keys defined here match the variable names in your tagged "parameters" cell in the notebook.
Output Record: Select the specific record intended for signal generation once the script execution is complete.
Set Signal Filters: Add filters to define the logic for your signals. These filters determine which data incidents identified by your model should successfully trigger the automation.
Save and Deploy: Once deployed, the sensor will automatically run following every data reload, knowledge model update, or change to the skill.
Your custom ML model is now operational within the automation pipeline. It will monitor your data continuously and generate signals to trigger downstream actions based on your unique algorithmic logic.
To ensure your custom sensor functions correctly, your notebook in the Machine Learning Workbench must be structured to communicate with the Celonis Skill.
1. Receiving Input (The Parameters Cell)
For the sensor to pass data to your script, you must define a specific cell at the top of your notebook to receive the Input Parameters.
The Tag: You must add the
parameterstag to this cell via the Property Inspector in the Workbench.The Logic: Define your variables with default values. Celonis will overwrite these with live data from your Knowledge Model during execution.
# This cell must have the "parameters" tag input_variable_1 = "default_value" threshold_limit = 0.85
2. Returning Output (Signal Generation)
The final output of your notebook should be a DataFrame or dictionary that matches the Output Record selected in the sensor configuration. If the output contains new records, the Skill generates a Signal for each one.
If your script does not produce any output rows, no signals will be generated. This allows your model to act as a filter, only triggering automation when specific conditions are met.
</admonition>