Code Generation Example

Many applications of data mining consist of scoring data using an existing model.

This example shows how to generate code that applies an existing model, that is, uses an existing model to score data.

There are two major steps:

  1. Create build and apply mining activities.
  2. Generate and execute the code for the apply activity:

Create Build and Apply Mining Activities

Detailed directions for creating mining activities are in the Oracle Data Mining 10.2.0.3 Tutorial. You can download the tutorial at Oracle Data Miner (http://www.oracle.com/technology/products/bi/odm/odminer.html).

The steps to create build and apply activities for Oracle Data Miner 11.1 are the same as those for 10.2.

Follow these steps to create build and apply activities:

  1. Install the required software and prepare for data mining as follows:

    Directions for installing Oracle Data Mining 10g Release 2 are in Appendix A of the Oracle Data Mining 10.2.0.3 Tutorial. You can download the tutorial at Oracle Data Miner (http://www.oracle.com/technology/products/bi/odm/odminer.html). Directions for installing Oracle Data Mining 11g Release 1 are in the Oracle Data Mining Administrator's Guide.

    If these steps have already been performed, you do not have to do them over again.

  2. Follow the directions in Chapter 8 of the tutorial to create and execute a classification build activity using the Support Vector Machine (SVM) algorithm:
  3. Create and execute an apply activity that applies the model that you just built to new data:
  4. Install the Oracle Data Miner PL/SQL Code Generator Extension in either Oracle JDeveloper or Oracle SQL Developer, as described in readme.html, the Oracle Data Miner release notes. readme.html is in the directory where Oracle Data Miner is installed.

You are now ready to generate and execute code for the apply activity.