Machine learning brings Rules to life on ARTIK cloud services

We are happy to announce that you can create Rules on ARTIK cloud services that utilize machine learning! Now ARTIK cloud services can not only trigger Rules from actual device data, but also from predicted data values or by determining whether data values are an anomaly.

The prediction and anomaly detection conditions can be created in the web interface or using the Rules APIs. This is only the beginning of machine learning on ARTIK cloud services, and we wanted to show you what it can already bring to your Rules.

What is machine learning?

On ARTIK cloud services, machine learning trains one of two model types that learn your device’s data usage.

  • A prediction model is trained to predict future data values based on your device data, with a specified delta time.
  • An anomaly detection model is trained to identify anomalies in your device data, with a specified confidence level.

Models are created using the machine learning APIs. These APIs are also integrated with our Rules functionality.

Apply machine learning to a Rule

One of the two models can be included as a condition in a Rule. The Rule is triggered by the machine learning output.

Normally when you create a Rule from the interface at My ARTIK Cloud, you select a device from your device list and then a field to use in the IF condition. This defaults to the Actual Value of the field.

To create a prediction condition, click the dropdown arrow next to Actual Value and choose to use the predicted value in the Rule instead.

ARTIK Cloud Rules

Note that this includes a delta time to make the prediction. The delta time for a prediction condition is measured from “now”, which is the time when the Rule is evaluated .This could be when a new message is received for the device or when the Rule is evaluated according to a date/time condition (the scheduling options at the very top of the Rule creation page). The condition in the above screenshot predicts what the value of onFire will be in one hour.

To create an anomaly detection condition, keep using the Actual Value of the device field. In the operator field below, select “an expected value” or “an unexpected value” to apply machine learning to incoming data values.

ARTIK Cloud Rules

Anomaly detection outputs a boolean that determines whether the value is an anomaly. The confidence level of anomaly detection determines whether the condition identifies many (high) or few (low) anomalies.

These models take some time to be trained. Both prediction and anomaly detection conditions will only be triggered when machine learning is complete!

Note that duration conditions can still be applied to Rules using prediction or anomaly detection conditions.

Machine learning in the Rule body

Machine learning conditions are straightforward to write in the JSON Rule body. Read our Rules documentation to learn more and see some examples.

It’s that simple! Machine learning introduces powerful new functionalities to ARTIK cloud services. Watch the blog and the developer documentation for updates on this feature.