1 Oracle Data Miner

Oracle Data Miner is an extension to Oracle SQL Developer. Oracle Data Miner is a graphical user interface to Oracle Machine Learning, a feature of Oracle Database.

Data analysts can use the intuitive Oracle Data Miner graphical user interface (GUI) to discover hidden patterns, relationships, and insights in their data. With Oracle Data Miner, everything occurs in an Oracle Database—in a single, secure, scalable platform for advanced business intelligence. Oracle Data Miner eliminates data movement and duplication, maintains security, and minimizes latency time from raw data to valuable information. Enterprises can use Oracle Data Miner for knowledge discovery to better compete on analytics.

Oracle Data Miner helps you perform the data preparation and model building required by the machine learning process.

1.1 About the Machine Learning Process

Machine learning is the process of extracting useful information from masses of data by extracting patterns and trends from the data.

Machine learning requires a problem definition, collection and cleansing of data, and model building. Most of the time spent in a typical machine learning project is devoted to understanding and processing of data.

1.2 Overview of Oracle Data Miner

Oracle Data Miner is an extension to Oracle SQL Developer. It is a graphical user interface to Oracle Machine Learning, a feature of Oracle Autonomous Database.

  • Oracle Data Miner enables users to build descriptive and predictive models to:

    • Predict customer behavior

    • Target best customers

    • Discover customer clusters, segments, and profiles

    • Identify customer retention risks

    • Identify promising selling opportunities

    • Detect anomalous behavior

  • Oracle Data Miner provides an Application Programming Interface (API) that enables programmers to build and use models.

  • Oracle Data Miner workflows capture and document the analytical methodology of the user. It can be saved and shared with others to automate advanced analytical methodologies.

  • The Oracle Data Miner GUI is an extension to Oracle SQL Developer 3.0 or later that enables data analysts to:

    • Work directly with data inside the database

    • Explore the data graphically

    • Build and evaluate multiple machine learning models

    • Apply Oracle Data Miner models to new data

    • Deploy Oracle Data Miner predictions and insights throughout the enterprise

Figure 1-1 shows a sample workflow of Oracle Data Miner.

Figure 1-1 Sample Data Miner Workflow

Description of Figure 1-1 follows
Description of "Figure 1-1 Sample Data Miner Workflow"

Oracle Data Miner creates predictive models that application developers can integrate into applications to automate the discovery and distribution of new business intelligence—predictions, patterns, and discoveries—throughout the enterprise.

1.3 Architecture of Oracle Data Miner

Oracle Data Miner consists of a server and one or more clients.

Before you install Oracle Data Miner, you must understand the architecture of Oracle Data Miner:

  • Oracle Data Miner, the client, is an integrated feature of Oracle SQL Developer 3.0 or later.

  • Oracle Database 12c Release 2 (12.2) Enterprise Edition (includes Oracle Database Personal Edition) or an earlier version of Oracle Database Enterprise Edition is the server. In addition to the database, Oracle Data Miner requires the installation of a Data Miner repository account. The repository is a separate account in the database named ODMRSYS. This repository is shared by all user accounts in the database that have been granted the appropriate privileges to use the Data Miner repository.

Figure 1-2 shows the components of Oracle Data Miner.

Figure 1-2 Oracle Data Miner Architecture

Oracle Data Miner Architecture

Oracle Data Miner uses the following Oracle Database features:

  • Oracle Machine Learning: Provides the model building, testing, and scoring capabilities for Oracle Data Miner.

  • Oracle XML DB: Provides services to manage the Oracle Data Miner repository metadata, such as the details about the workflow specifications.

  • Oracle Scheduler: Provides the engine for scheduling the Oracle Data Miner workflows.

  • Oracle Text: Provides services necessary to support text mining.

  • Oracle Machine Learning for R: Runs user-defined R functions using embedded R execution.

Note:

Except for Oracle Machine Learning for R, these features are all included by default in Oracle Database Enterprise Edition. Oracle Machine Learning for R requires additional installation steps.

1.4 Snippets in Oracle Data Miner

Snippets are code fragments, such as SQL functions, optimizer hints, and miscellaneous PL/SQL programming techniques.

SQL Developer provides snippets to help you write PL/SQL programs. Some snippets are just syntax, and others are examples. You can insert and edit snippets when you are using the SQL Worksheet or when creating or editing a PL/SQL function or procedure using SQL Worksheet or SQL Query node.

  • Open SQL worksheet: To open SQL Worksheet, go to Connections for SQL Developer, right-click the connection to use, and select Open SQL Worksheet.

  • Insert snippet: To insert a snippet into your code in a SQL Worksheet or in a PL/SQL function or procedure, drag the snippet from the snippets window and drop it into the desired place in your code. Then edit the syntax so that the SQL function is valid in the current context. To see a brief description of a SQL function in a tool tip, hold the pointer over the function name. Oracle Data Miner provides snippets for the EXPLAIN, PREDICT, and PROFILE procedures in DBMS_PREDICTIVE_ANALYTICS, and for the machine learning functions for scoring data using Prediction, Clustering, or Feature Extraction.

See Also:

See the SQL Developer Online Help for more information about SQL Worksheet.

1.4.1 Using Predictive Analytics Snippets

In Oracle SQL Developer, you can view the list of Predictive Analytics snippets and use them.

To view the list of Predictive Analytics functions, and to use a snippet:

  1. Open Oracle SQL Developer.
  2. Select the connection that you are using for Oracle Data Miner.
  3. From the SQL Developer menu, go to View and then select Snippets.
  4. From the drop-down list, select Predictive Analytics.

    The Predictive Analytics group of snippets includes the following snippets:

    • Explain: Use DBMS_PREDICTIVE_ANALYTICS.EXPLAIN() to rank attributes in order of influence when explaining a target column.

    • Predict: Use DBMS_PREDICTIVE_ANALYTICS.PREDICT() to predict the value of a target column based on values in the input data.

    • Prediction Anomaly Function: Use the Anomaly Detection Predictive query to predict anomalous customers.

    • Prediction Classification Function: Makes predictions using dynamic classifications.

    • Prediction Cluster Function: Predicts the cluster a customer belongs to.

    • Prediction Feature Set Function: Predicts feature sets to provide a general characterization of the underlying customer data.

    • Prediction Regression Function: Predicts the age of customers who are likely to use an affinity card.

    • Profile: Use DBMS_PREDICTIVE_ANALYTICS.PROFILE() to generate rules that identify the records that have the same target value.

  5. To use a snippet, drag the snippet to the SQL Worksheet or to a place in a PL/SQL program.

    Note:

    The Explain, Predict, and Profile snippets have one or more commented-out DROP statements, such as:

    --DROP TABLE mining_explain_result;

    If you run one of these snippets more than once, then remove the comment characters for the DROP statement.

If you drag the Explain snippet to SQL Worksheet, then you see:

--Available in Oracle Enterprise DB 10.2 and later

--Ranks attributes in order of influence to explain a target column.

--For more info go to: http://www.oracle.com/pls/db112/vbook_subject?subject=dma

--Remove comment on the Drop statement if you want to rerun this script

--DROP TABLE mining_explain_result;

--Perform EXPLAIN operation

BEGIN

DBMS_PREDICTIVE_ANALYTICS.EXPLAIN(

data_table_name => '"CUSTOMERS"',

explain_column_name => '"CUST_GENDER"',

result_table_name => 'mining_explain_result',

data_schema_name => '"SH"');

END;

/

--output first 10 rows from resulting table mining_explain_result

COLUMN ATTRIBUTE_NAME FORMAT A30

COLUMN ATTRIBUTE_SUBNAME FORMAT A30

COLUMN EXPLANATORY_VALUE FORMAT 0D999999

COLUMN RANK FORMAT 999999

select * from mining_explain_result where rownum < 10;

When you run this code, you get the following results (in Script Output):

anonymous block completed

ATTRIBUTE_NAME ATTRIBUTE_SUBNAME EXPLANATORY_VALUE RANK

----------------- ------------------------------ ----------------- ------

CUST_LAST_NAME 0.151359 1

CUST_MARITAL_STATUS 0.015043 3

CUST_INCOME_LEVEL 0.002592 4

CUST_CREDIT_LIMIT 0.000195 5

CUST_EMAIL 0.000000 6

CUST_TOTAL 0.000000 6

CUST_TOTAL_ID 0.000000 6

CUST_FIRST_NAME 0.000000 6

9 rows selected

1.5 How to Use Oracle Data Miner

Lists the different ways in which you can learn how to use Oracle Data Miner.

You can learn how to use Oracle Data Miner in the following ways:

  • By using Oracle By Example tutorials

  • By experimenting on your own using the sample data

  • By using the Online Help

  • By asking questions in the Oracle Machine Learning forum

  • By referring to Oracle Data Miner documentation for reference information about machine learning in general and Oracle Data Miner in particular.

1.5.1 Oracle By Example for Oracle Data Miner 4.1

The Oracle By Example tutorials teach you how to install and use Oracle Data Miner.

You can learn how to:

  • Set Up Oracle Data Miner 4.1: This tutorial covers the process of setting up Oracle Data Miner for use within Oracle SQL Developer 4.1 connected to Oracle Database 12c.

  • Use Oracle Data Miner 4.1: This tutorial covers the use of Oracle Data Miner 4.1 to perform machine learning on Oracle Database 12c. In this lesson, you examine and solve a machine learning business problem by using the Oracle Data Miner graphical user interface (GUI). The Oracle Data Miner GUI is included as an extension of Oracle SQL Developer, version 4.1.

  • Use Feature Selection and Generation with GLM: This tutorial covers the use of Oracle Data Miner 4.1 to leverage enhancements to the Oracle implementation of Generalized Liner Models (GLM) for Oracle Database 12c. These enhancements include support for Feature Selection and Generation.

  • Perform Text Mining with an Expectation Maximization Clustering Model: This tutorial covers the use of Oracle Data Miner 4.1 to leverage new text mining enhancements while applying a clustering model. In this lesson, you learn how to use the Expectation Maximization (EM) algorithm in a clustering model.

  • Use Predictive Queries With Oracle Data Miner 4.1: This tutorial covers the use of Predictive Queries against machine learning data by using Oracle Data Miner 4.1.

  • Use the SQL Query Node in an Oracle Data Miner Workflow: This tutorial covers the use of the new SQL Query Node in an Oracle Data Miner 4.1 workflow.

Note:

The tutorials are in Oracle Learning Library under the Oracle Data Miner 12c OBE Series.

1.5.2 Sample Data

Sample Data is loaded in your account when you install Oracle Data Miner.

Note:

The SH sample schema is not shipped with Oracle Database 12.2. To install the sample schema, go to DB Sample Schemas.

Related Topics

1.5.3 Oracle Data Miner Online Help

The online help specific to Oracle Data Miner is in the help folder Oracle Data Miner Concepts and Usage.

To view or search the online help for Oracle Data Miner click Help and then click Table of Content. Then expand the Table of Content and go to Oracle Data Miner Concepts and Usage on the Contents tab of Help Center.

To get help for a specific dialog box, click the Help button or press F1. To get help for objects in a workflow, select the object and press the F1 key.

Online help contains reference topics and the topics that describe how the GUI works. To see reference topics, either expand the help contents in the online help or search in the online help.

1.5.3.1 Search the Online Help
To search the online help, use the search box at the top of Help Center:

Type the word or words that you want to search for in the search box and press Enter.

Select one of the following search options: case sensitive (Match case) or case insensitive; and whether to match topics based on all specified words, any specified words, or a Boolean expression.

Search performs a full-text search of all Oracle Data Miner online help topics, including Oracle Data Miner Release Notes.

To cancel a search, click Cancel symbol. A red square..

1.5.4 Oracle Data Miner Documentation

Oracle Data Miner is a Graphical User Interface (GUI) for Oracle Machine Learning available through SQL Developer, which uses in-database machine learning capabilities.

Oracle Data Miner documentation is included in the Oracle Database Documentation Library for the version of the database that you have installed. Documentation Libraries are posted at the Documentation site in the Database section.