Use Predictions

Predictions use historical and transactional data to predict future machine-related metrics, and to identify potential risks to your machines.

Use predictions to identify risks, carry out proactive maintenance of machines, and avoid product delivery delays. Predictions help you create and meet your production plans. Predictions help warn you of impending machine failure in advance. Preventive maintenance can help save the costs associated with machine breakdown or unavailability.

View Predictions

You can view the predictions for a machine under the Predictions tab of the machine view.

  1. In the Floor Plan Floor Plan icon view, or in the Production Product icon view for a factory, click the icon for the machine you want to monitor.
  2. Click Predictions Predictions iconin the menu bar.

    The available predictions, if any, for the machine appears. A prediction value includes the upper and lower limits of the prediction range along with the duration for which the prediction is valid. The prediction range is calculated based on the predicted value and the accuracy supplied by the server. For example, if the accuracy of your current prediction model is 90% and the predicted value is 10, then the prediction range is between 9 and 11.

    Here's a sample prediction based on the average temperature metric:
    Described in text. AvgTemp reads between 17.89 and 18.11.

  3. (Optional) Expand the prediction to see the data plot for the sensor or metric attribute along with the predicted values.
    Here's an expanded prediction sample:
    Described in text. Shows expanded AvgTemp Prediction.

    The sensor data plot for the Temperature sensor and the data plot for the AvgTemp metric are shown in green and blue respectively. The Lower Value and Upper Value predictions for the hourly AvgTemp also appear against the data plot. These are shown as dashed lines.

    In the current example, the prediction is due to be refreshed in another 5 minutes. You can optionally select Historical Predictions to see past predictions.

Define a Prediction

Predictions use historical and transactional data to predict future machine-related metrics, and to identify potential risks to your machines. Create a Prediction in the Design Center.

  1. Click Menu Menu icon and then click Design Center.
  2. Select Organization from the Design Center menu.
    You can also select Machine Types to open the Machine Types page. You can then select an existing machine type and create a prediction for it.
  3. Click Predictions Predictions icon.
  4. Click Add Add icon.
  5. Specify a Name for the prediction.
  6. (Optional) Enter a Description for this prediction.
  7. (Optional) In the Configuration section, select a value under Keep Metric Data For.
    If you have unique storage requirements for historical data related to this prediction, you can select an option that is different from the global settings defined under Storage Management on the application Settings page.
    For example, if you are making frequent predictions across a large number of machines, and the prediction data is not required beyond a month, then you can select 30 Days under Keep Metric Data For to optimize storage.
  8. In the configuration section, select the Machine Type to which the prediction applies.
  9. Under Model, leave Automatic Model selected.
  10. Under Target Attribute, select the Sensor or Metric for which you wish to predict the value.
    You cannot use on-demand metrics for predictions. The metric must be a scheduled metric.
  11. Under Forecast Window, select one of the options:
    • 1 Hour Ahead: Select this option to create a prediction for the next one hour.
    • 24 Hours Ahead: Select this option to create a prediction for the next 24 hours.
    • 7 Days Ahead: Select this option to create a prediction for the next 7 days.
    • 30 Days Ahead: Select this option to create a prediction for the next 30 days.

    Note:

    The options that appear depends upon the data life span settings for your device data and metric data. These settings can be managed under Menu > Settings > Storage Management.
  12. Select a Reporting Frequency for the prediction.
    For example, if you choose a Forecast Window of 24 Hours Ahead and a Reporting Frequency equal to Hourly, then the prediction for 24 hours ahead is made every hour.
  13. Under Training, select the Data Window.

    The Data Window identifies the historical data that is used to train the system for making predictions.

    • All Available Data: Uses the entire available historical data to train the prediction model.
    • Rolling: A rolling data window uses data from a rolling time window to pick the most recent data for training. For example, you can choose to train your prediction model with a rolling data window of the last 7 days, and choose to perform the prediction training daily.

      When you use a rolling window, the training model is re-created periodically, as determined by the frequency that you choose.

      • Frequency: You can optionally change the frequency of the prediction model training. For example, if you choose Daily, then the training happens every day at 00:00 hours (midnight), UTC time by default.
      • Rolling Window Duration: The duration of the rolling window going back from the model training time. For example, if you select 7 Days, then the last 7 days of target attribute data is used to train the prediction model.
    • Static: Uses a static data window to train your prediction model. Select the Window Start Time and Window End Time for your static window period.

      The static window duration must be at least three times the Forecast Window, and a minimum of 72 hours.

      The static data window provides data for a one-time training of your prediction model. If your prediction accuracy changes in the future, you should edit the prediction to choose a different static window.

  14. Click Save to save the prediction.

Define a Prediction Using an Externally Trained Model

If you have a PMML file containing your externally trained model, you can use the PMML file to score your prediction in Oracle IoT Production Monitoring Cloud Service.

By default, Oracle IoT Production Monitoring Cloud Service uses the most appropriate built-in training model to train the prediction. However, if your data scientists have externally trained models for your specific environment, you can use these to replace the training in Oracle IoT Production Monitoring Cloud Service. Oracle IoT Production Monitoring Cloud Service then performs the prediction scoring using your pre-trained model.
  1. Click Menu Menu icon and then click Design Center.
  2. Select Organization from the Design Center menu.
    You can also select Machine Types to open the Machine Types page. You can then select an existing machine type and create a prediction for it.
  3. Click Predictions Predictions icon.
  4. Click Add Add icon.
  5. Specify a Name for the prediction.
  6. (Optional) Enter a Description for this prediction.
  7. (Optional) In the Configuration section, select a value under Keep Metric Data For.
    If you have unique storage requirements for historical data related to this prediction, you can select an option that is different from the global settings defined under Storage Management on the application Settings page.
    For example, if you are making frequent predictions across a large number of machines, and the prediction data is not required beyond a month, then you can select 30 Days under Keep Metric Data For to optimize storage.
  8. In the configuration section, select the Machine Type to which the prediction applies.
  9. Under Model, select Upload PMML File to upload a PMML xml file that contains your exported trained model. Alternatively, select Use Existing PMML File to use a previously uploaded PMML file.
    For example, you may have completed external training using libraries like PySpark pipeline or R pipeline, and exported the trained model to a PMML file.
    You can only use training models supported by PMML4S (PMML Scoring Library for Scala), such as the neural network. For a list of supported model types in PMML4s, see https://www.pmml4s.org/#model-types-support.
  10. Map the PMML model parameters to your machine type sensor attributes and metrics (KPIs).
    The default mapping is performed for you. Verify and change any mappings to match the attributes in your PMML file.
    Map PMML Attributes to Sensor Attributes and Metrics

  11. Under Forecast Window, select one of the options:
    • 1 Hour Ahead: Select this option to create a prediction for the next one hour.
    • 24 Hours Ahead: Select this option to create a prediction for the next 24 hours.
    • 7 Days Ahead: Select this option to create a prediction for the next 7 days.
    • 30 Days Ahead: Select this option to create a prediction for the next 30 days.

    Note:

    The options that appear depends upon the data life span settings for your device data and metric data. These settings can be managed under Menu > Settings > Storage Management.
  12. Select a Reporting Frequency for the prediction.
    For example, if you choose a Forecast Window of 24 Hours Ahead and a Reporting Frequency equal to Hourly, then the prediction for 24 hours ahead is made every hour.
  13. Click Save to save the prediction.

Edit a Prediction

Edit a prediction to change the prediction settings. You can also tweak your prediction model to add or remove features, and re-train the prediction model for your environment.

  1. Click Menu Menu icon and then click Design Center.
  2. Select Organization from the Design Center menu.
  3. Click Predictions Predictions icon.

    If the initial training for the prediction has completed, you should see an accuracy percentage for the prediction. The accuracy percentage reflects the scoring accuracy history of your prediction model measured against actual data.

    Here's a sample Predictions page:


    Shows two prediction entries with 98.06% and 99.40% accuracy readings.

  4. Click Edit (Edit icon) against the prediction that you wish to edit.
  5. (Optional) Under Prediction Model, click Configure Model if you wish to re-configure the current prediction model for your prediction.

    Note:

    The Prediction Model section and the Configure Model options are available only for metric-based predictions, and not for direct sensor-based predictions.


    Configure Model button on Edit Prediction page. Described in text.

    This setting is available if the training for your prediction has completed, and a scoring accuracy is available. You can add or remove features or attributes currently associated with your prediction to select a feature-set that you believe is most relevant for your environment and will result in better scoring accuracy. Your changed feature-set is then used to re-train the prediction model. You may also wish to re-train the prediction model if golden data has arrived post the initial training of the prediction.

    1. Select or deselect features, or attributes, as required under the Used column.

      Edit Prediction Model dialog with feature list.

      If an attribute shows selected under the Best Model column, it means that the attribute is part of the best prediction model to date.
    2. Select Automatically accept new model if accuracy is increased to automatically switch the active model to your new model if the scoring accuracy is better.
      If you do not select this option, then after the training is complete, you can see both the currently active model and new model scores. You can then choose to switch to the new prediction model if you wish.
    3. Click Rerun Training to re-train the prediction with the chosen features and cumulative data.
      Clicking Cancel discards your changes.
  6. Edit other prediction settings on the Edit Prediction page, as required.
  7. Click Save.