Apply a Predictive or Oracle Machine Learning Model to a Data Set

Use the data flow editor to score a predictive model on any data set, or score an Oracle machine learning model on a data set in its corresponding database.

Running the model outputs a new data set with columns containing predicted values that can be used for analysis and visualization.

When you run a predictive model, the data is moved into and processed by Oracle Analytics. When you run an Oracle machine learning model, data isn't moved from the database into Oracle Analytics. Instead the model resides, is processed, and the output data set is stored in the database.

  1. In the Home page, click Create and select Data Flow.
    The Add Data Set pane is displayed.
  2. Select the data set that you want to apply the model to. If you're applying an Oracle machine learning model, then you must pick a data set from the same Oracle Database or Oracle Autonomous Data Warehouse where the model exists. Click Add.
  3. In the data flow editor, click Add a step (+).
  4. Navigate to the bottom of the list and click Apply Model.
  5. In the Select Model dialog, select the model. If you're applying an Oracle machine learning model, then only the models registered for the corresponding Oracle Database or Oracle Autonomous Data Warehouse data set are displayed. Click OK.
  6. Go to the Outputs section and inspect the columns returned by the model. Select the columns that you want outputted with the data set, and update the Column Name fields as needed.
    Output columns vary depending on the model type. For example, for numeric prediction, output columns include PredictedValue and PredictedConfidence. And for clustering, output columns include the clusterId.
  7. Go to the Inputs section and inspect and adjust how the columns in the scoring data set are mapped to the columns in the model. The parameters section displays parameters specific to the model type. For example, if you use a clustering model for scoring, maximum null values present is a parameter that you can provide for the scoring process. This parameter is used in the missing value imputation.
    If you're working with an Oracle machine learning model, then the model and the mapped input data types must match. To view the model's data types:
    1. On the Home Page, click Console.
    2. Click Machine Learning and go to the Models tab.
    3. Locate the model, click its Actions Menu, and click Inspect.
    4. Go to the Details tab and expand the Input Columns section to view the data types.
  8. In the data flow editor, click Add a step (+) and select Save Data.
  9. Enter a name in the Name field, and in the Save data to field confirm or select where to save the output data. If you're working with an Oracle machine learning model, then the data set's connection information defaults to the input data set's connection.
  10. Set data preferences as needed in the Treat As and Default Aggregation fields.
    When you save data, the apply model appends the model's output columns that you selected to the data set.
  11. Click Save, enter a name and description for the data flow, and click OK to save the data flow.
  12. Click Run Data Flow to create the data set.