Deploying Machine Learning Models from Notebooks to Zementis

The Zementis platform is a predictive analytics scoring engine that is included within the TrendMiner installation (from version 2021.R2). Zementis offers a way to deploy machine learning, AI and predictive models which makes it possible to score incoming data in real-time and store that information as a new tag in TrendMiner via the Machine Learning Model tags functionality.

Zementis can only be accessed after access management is set up. A separate licence is also necessary. Contact us at TrendMiner if you are interested.

  • Predicitve Model markup Language (PMML)
  • Setting up your notebook
  • Deploying models
  • Listing models
  • Model details
  • Deleting models
  • Additional documentation
  • Current limitations

Predictive Model Markup Language (PMML)

Zementis Predictive Analytics is based on open standards to draw on the innovation of a vast community of data scientists, statisticians, IT professionals and others who are experts at infusing quantitative techniques into sophisticated business decision making.

You'll use the Predictive Model Markup Language (PMML) standard to import and deploy predictive models. The TrendMiner notebooks are preinstalled with a Python library (Nyoka) for converting predictive models into PMML.

Nyoka is a Python library that provides comprehensive support for the latest PMML standard as well as extensions for data preprocessing, script execution and deep neural networks. Using Nyoka, you can export your predictive models from popular Python ML/DL frameworks into PMML.

Setting up a notebook to deploy models

The following code snippets allows the user to import the necessary packages and authentication to make use of the Zementis Scoring Engine that is built into the TrendMiner installation. These snippets can be added manually or via the code snippet section inside the TrendMiner Notebooks.

from trendminer.ml.models import ZementisModels
zementis = ZementisModels(client)

Deploying a model

Once a model has been converted to PMML, you will be able to deploy that model to the Zementis Scoring engine. Successful deployed models will be listed in the Machine Learning Models tags functionality.

model_id = zementis.deploy_model("Your PMML file as a string")

Listing available models

A list of all models can be obtained via the code snippet:

zementis.list_models()

Model details

Detailed information about a model in Zementis can be requested as followed:

zementis.model_details(model_id)

Deleting a model

A model can be deleted by providing the model name to the following snippet:

zementis.delete_model(model_id)

More info

More information can be found in the python-SDK documentation.

TrendMiner also offers a built-in anomaly detection model that can be deployed to Zementis. More information about this model can be found here.

Current limitations

Only models with 10 or less input variables can be deployed.

Only analogue inputs and outputs (integer, float, double) are supported.

Only PMML models supported by Zementis can be deployed.