Data Transforms supports the use of ML Model in a data flow. Learn
how to create and use Machine Learning (ML) Models in data flows.
Topics
Create an ML Model Data Entity in the Data Flow editor To use ML models in Data Transforms you need to create two data flows. You need to first build the ML model data entity using the Data Flow editor, and then you can use the data entity in a data flow to mine data from a source connection and load it into a target server.
ML Model Data Entity Properties The Properties tab of the Add Data Entity wizard provides data mining options that you can use to define the ML Model data entity.
Use ML Model in a Data Flow You can use the Prediction Model database function to run ML Model algorithms on source data and load the output to a target database.
Create an ML Model Data Entity in
the Data Flow editor 🔗
To use ML models in Data Transforms you need to create two data flows. You
need to first build the ML model data entity using the Data Flow editor, and then you can
use the data entity in a data flow to mine data from a source connection and load it into a
target server.
To build an ML Model data entity in the Data Flow editor,
Drag the data entity that you want to build the ML Model on onto the Design Canvas.
Select the component and click the Add Data Entity icon present on the top right corner of the target component.
Add Data Entity page appears allowing you to configure the following details
of the target component:
General tab
In the Name text box, enter the name of the newly
created Data Entity.
From the Entity Type drop-down, select ML
Model as the data entity type.
When you select
this entity type the user interface changes as follows:
The Connection drop down only lists the
Oracle connections that you have created.
The Add Data Entity wizard displays the
Properties tab where you can select the Type of
Learning, Function, Algorithm, and configure parameters to
define the ML Model. See ML Model Data Entity Properties for more information.
From the Connection Type drop-down, select the
required connection from which you wish to add the newly created Data
Entity. For ML Model data entities, the Connection Type drop-down
only lists Oracle as the option.
The Connection drop-down is populated with the connections
you have created with the associated connection type. From the
Connection drop-down, select the server name where you wish
to keep the ML model data entity.
In the Schema drop-down, all schema corresponding to
the selected connection are listed in two groups.
New Database Schema (ones that you've not imported
from before) and
Existing Database Schema (ones that you've imported
from before and are potentially replacing data entities).
From the Schema drop-down, select the required schema.
In the Tags text box, enter a tag of your choice.
You can use tags to filter the Data Entities displayed in the Data
Entity Page.
If you want to mark this data entity as a feature group,
expand Advanced Options and click the Treat as Feature
Group checkbox.
Click Next.
Properties tab
Select the Type of Learning, Function, and
Algorithm you want to use to build this data entity. For more
information about the options, see ML Model Data Entity Properties.
Based on the options selected, the Parameters
section is populated with the list of parameters that are marked as
"Importance" and "High". You can add other required parameters using the
icon.
You must specify a value for each parameter
so that the data flow can run successfully.
Columns tab
Click the Add Columns icon, to add new columns to the newly created Data
Entity.
A new column is added to the displayed
table.
The table displays the following columns:
Name
Data Type - Click the cell to configure the
required Data Type.
Scale
Length
Actions - Click the cross icon to delete the
created column.
To delete the columns in bulk, select the columns and click
the Delete icon.
To search for the required column details, in the Search
text box enter the required column name and click enter. The details of
the required column are displayed.
Click Next.
Preview Data Entity tab
It
displays a preview of all the created columns and their configured details.
If the data entity belongs to an Oracle database, you can also view
statistics of the table. See View Statistics of Data Entities for more information.
Click Save to save the configuration and exit the wizard.
Save and execute the data flow.
The new Data Entity
is created. displayed in the Data Entities page.
The Properties tab of the Add Data Entity wizard provides data
mining options that you can use to define the ML Model data entity.
This topic assumes prior knowledge of Oracle Machine Learning concepts such as data
mining functions and algorithms. For more information, see Oracle Machine Learning for
SQL API Guide.
In the Column Mapping tab, map the source column that you want
to embed to the INPUT attribute of the operator. The only column available in the
column mappings is prediction parameters. Drag a text column from
the available columns to the Expression column.
Drag the table that you want to use as a target in the data flow and drop it on the
design canvas.
Save and execute the data flow.
Data Transforms will run
the prediction model on the source data and write the output to the target
table.