Predictor Machine Learning

Enterprise Feature in beta

If you are interested in using this feature, please contact us.
Predictor™ is a beta capability only accessible to Enterprise users - we may make significant changes before the final version.

Predictor™: Machine Learning for Supply-chain Integrity

Predictor™ is EVRYTHNG's latest step in helping our customers to get value from their data using machine learning. This tutorial will take you to the four steps to create and deploy a machine learning model in your EVRYTHNG account. Predictor™ is the one stop shop in the EVRYTHNG platform for acquiring, training and deploying dedicated machine learning solutions. It offers a number of pre-packaged models for complex supply-chain integrity problems, which we developed with internal and external domain experts. Customers can select and install in their account, which Predictor™ tries to train the model on the data in your EVRYTHNG account. This means that the model is tailored to your processes and products.
A successfully trained model will transparently run predictions on actions whenever a user-generated action, for example when a user scans a product, is generated.
What happens if you cannot successfully deploy a model? This is most likely because you do not have enough data. Machine learning algorithms are basically glorified pattern matchers; and they need a lot of data to learn and generalise patterns.

Steps to deploy a model

Predictor™ orchestrates the entire workflow, from dataset description to model training and finally model deployment. Predictor™ will also install the necessary applications and Reactor™ scripts in a user account. These scripts provide the glue to connect Predictor™ with the rest of the EVRYTHNG platform.

Selecting the model

The process starts with selecting a type of model as well as the data on which the model should be trained. List available models by accessing the /machineLearning/models endpoint:

curl -H Authorization:$APP_API_KEY
  -X GET https://ml.evrythng.io/machineLearning/models

Each type of model is for a specific use case. For example, to detect abnormal product scans, the pick "scanningAnomalies" as type of model and tells Predictor™ to train the model on actions.As time goes by we will add more types of models ready to be used.

Prepare the data

Next, Predictor™ creates a training dataset and trains the model by providing it with one or more URLs to EVRYTHNG resources:

curl -H Authorization:$APP_API_KEY \
  -H Content-Type:application/json \
  -X POST 'https://ml.evrythng.io/machineLearning/models/scanningAnomalies/1cf87e6d50b942b2998fe40f8e38428d/datasets' \
  -d '{
  "evtUrls": [
    "https://api.evrythng.com/actions/all?context=true"
  ]
}'

This step downloads the data to which the URLs point. Once the data is downloaded, it will automatically perform data and feature engineering. This step can take up to 40 minutes.
If training was successful, the model can be deployed to production, for it to return predictions whenever it receives new data. To continue the previous example, whenever a consumer scans a product, the model tries to classify the resulting scan action as normal or abnormal.

Throughout its lifetime, the model will be continuously improved by incorporating user feedback into the data and retraining model. This is referred to as Active Learning.

Deploy the trained model

Once the training data is ready, deploy the model to your account. If the model hasn’t been trained yet, it will train and optimise the model, deploy the model into the cloud and create an integration reactor script that provides a uniform interface, through EVRYTHNG actions, to machine learning models.

curl -H Authorization:$APP_API_KEY \
  -H Content-Type:application/json \
  -X POST 'https://ml.evrythng.io/machineLearning/models/scanningAnomalies/1cf87e6d50b942b2998fe40f8e38428d/deployments' \
  -d '{
  "datasets": [
    "uhwaecanegpa9pawrgaknfgm"
  ]
}'

Testing your model

If your model was successfully deployed (this will again take up to 20 minutes), you should start to see new actions called _predictions in your dashboard.

Predictor Machine Learning


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.