Register and Use Oracle Machine Learning Models

You can register and use Oracle machine learning models from Oracle Database or Oracle Autonomous Data Warehouse to score data in Oracle Analytics. Use the data flow editor to apply the machine learning models to your data.

How Can I Use Oracle Machine Learning Models in Oracle Analytics?

Oracle Analytics allows you to register and use Oracle machine leaning models from Oracle Database or Oracle Autonomous Data Warehouse.

Using Oracle machine learning models with Oracle Analytics greatly increases the level of predictive analytics that you can perform on data sets because the data and the model reside in the database, the data scoring is performed in the database, and the resulting data set is stored in the database. This allows you to use the Oracle machine learning execution engine to score large data sets.

You can register and use Oracle machine learning models from these database data sources:
  • Oracle Autonomous Data Warehouse
  • Oracle Database

In Oracle Analytics you can register any of the database's Oracle machine learning models in the mining classes Classification, Regression, Clustering, Anomaly, or Feature Extraction that were created using the Oracle Machine Learning for SQL API (OML 4SQL). Your Oracle Analytics user role and database permissions determine the Oracle machine learning models that are available for you to register and use.

You can also create predictive models in Oracle Analytics. See What Are Oracle Analytics Predictive Models?

Typical Workflow to Register and Use Oracle Machine Learning Models

Here are the common tasks for registering Oracle machine learning models from Oracle Database or Oracle Autonomous Data Warehouse, and how to apply the models to data sets and use them in projects.

Task Description More Information
Register the Oracle machine learning model Use an Oracle Database or Oracle Autonomous Data Warehouse connection to find Oracle machine learning models and register them for use with Oracle Analytics.

Register Oracle Machine Learning Models in Oracle Analytics

Inspect and visualize the model's views Access a list of the model's views to learn more information about the registered model such as the model statistics, target value distribution, and algorithm settings. Visualize the model's views to help you better understand and utilize the model.

Inspect Registered Oracle Machine Learning Models

Visualize a Registered Oracle Machine Learning Model's View

Apply a model to your data using a data flow Create a data flow to apply an Oracle machine learning model to your data and generate a data set that includes the predicted trends and patterns.

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

Register Oracle Machine Learning Models in Oracle Analytics

The Oracle machine learning models must be registered in Oracle Analytics before you can use them to predict data. You can register and use models that reside in your Oracle Database or Oracle Autonomous Data Warehouse data sources.

  1. On the Home page, click Page Menu, and then click Register ML Model.
    This option is available for users with the BI Service Administrator or DV Content Author role.
  2. In the Register an ML Model dialog, select a connection.
    In the Select a Model to Register dialog, you'll see the database's Oracle machine learning models in the mining classes Classification, Regression, Clustering, Anomaly, or Feature Extraction that were created using the Oracle Machine Learning for SQL API (OML 4SQL).

    If needed, click Create Connection to create a connection to the Oracle Database or Oracle Autonomous Data Warehouse data source containing the Oracle machine learning model that you want to use.

  3. In the Select a Model to Register dialog, click the model that you want to register and review the model's information. For example, the model class and algorithm used to build the model, the target the model predicts, the columns the model is trained on, model predictions, and parameters.
  4. Click Register.
  5. From the Home page, click Navigator, and then click Machine Learning to confirm that the model was imported successfully.

Inspect Registered Oracle Machine Learning Models

You can access and review information about the Oracle machine learning models that you registered in Oracle Analytics.

View a Registered Model's Details

View an Oracle machine learning model's detail information to help you understand the model and determine if it's suitable for predicting your data. Model details include model class, algorithm, input columns, output columns, and parameters.

When you register a model, its detail information is included. This information is gotten from Oracle Database or Oracle Autonomous Data Warehouse.
  1. On the Home page, click Navigator, and then click Machine Learning.
  2. Select a model, click its Actions menu, and then select Inspect.
  3. Click Details to view the model's information.

What Are a Registered Model's Views?

When an Oracle machine learning model is created, views containing specific information about the model are generated and stored in the database. Use Oracle Analytics to access a list of a model's views, and then build data sets that you can use to visualize the information contained in the views.

Views contain information about the registered model such as model statistics, target value distribution, and algorithm settings. The number and kind of views created are determined by the model's algorithm. So a model built from the Naive Bayes algorithm has one set of views and a model built from the Decision Tree algorithm has a different set of views. For example, some of the views generated for a Decision Tree model are:
  • Scoring Cost Matrix - Describes the scoring matrix for classification models. The view contains actual_target_value, predicted_target_value, and cost.
  • Global Name-Value Pairs - Describes global statistics related to the model like number of rows used in the model build and convergence status.
  • Decision Tree Statistics - Describes the statistics associated with individual nodes in the decision tree. The statistics include a target histogram for the data in the node. For every node in the tree, this view has information about predicted_target_value, actual_target_value, and node support.

Each view's name is unique, for example DM$VCDT_TEST. The format used to generate view names is DM$VAlphabet_Model Name where:

  • DM$V - Represents a prefix for views generated from a registered model.
  • Alphabet - Represents a value that indicates the type of output model. For example, C indicates that the view type is Scoring Cost Matrix, and G indicated that the view type is Global Name-Value Pair.
  • Model Name - Holds the name of the registered Oracle machine learning model and its view. For example, DT_TEST.

For more information about views, see the documentation for your Oracle database version.

Oracle Analytics provides a list of any registered model's views. However, you can only access and visualize views for Oracle Database 12c Release 2 or later. If you're working with an early version of Oracle Database, then you can't use Oracle Analytics to access and visualize views.

View a Registered Model's Views List

A registered model's views are stored in the database, but you can use Oracle Analytics to display a list of the model's views.

Views contain information such as a model's size, settings, and the attributes used in the model. This information can help you better understand and utilize the model.

Note:

You can access and visualize views for Oracle Database 12c Release 2 or later. If you're working with an earlier version of Oracle Database, then these views don't exist in the database and you can't use Oracle Analytics to access and visualize them.
  1. On the Home page, click Navigator, and then click Machine Learning.
  2. Locate and click a registered model's Actions menu, and then click Inspect.
  3. Click the Related tab to view a list of the model's views.

Visualize a Registered Oracle Machine Learning Model's View

Visualize any of a registered model's views to discover information that helps you better understand and utilize the model.

Note:

You can access and visualize views for Oracle Database 12c Release 2 or later. If you're working with an earlier version of Oracle Database, then these views don't exist in the database and you can't use Oracle Analytics to access and visualize them.
When creating the data set, you'll need to know the model's view name and the database schema name. Use the following task to find these names, create the data set, and visualize the view's information.
  1. On the Home Page, click Navigator, and then click Machine Learning.
  2. Locate the registered machine learning model and click its Actions menu. Click Inspect.
  3. Click Details and confirm that the Model Info section is expanded. Go to the DB Model Owner field and record the database schema name.
  4. Click Related and locate and record the name of the view. Click Close.
  5. On the Home page, click Create and click Data Set.
  6. Select the connection that contains the machine learning model and its views.
  7. In the Data Set editor, browse for and click the database schema name that you located on the Details tab.
  8. Select the view that you located on the Related tab, and double-click columns to add them to the data set. Click Add.
  9. Click Create Project to build visualizations.