This chapter describes one way to deploy the results of data mining. Some data-mining enabled applications have models that are developed on one system and then deployed to other (production) systems. Production applications often need only to apply models built elsewhere. The Oracle Data Mining Scoring Engine supports scoring data (applying models) using models created by other instances of Oracle Data Mining.
The Scoring Engine allows customers to limit the Oracle Data Mining (ODM) functionality available within their scoring applications to ensure that compute-intensive operations such as model building are not performed on production systems where data scoring is performed.
This chapter discusses the following topics:
The ODM Scoring Engine supports operations for preparing data as required from the build process, importing a model, and applying a model to data. All transformation functionality is included in the Scoring Engine. All functionality provided in the Scoring Engine behaves exactly as the same functionality in the full system.
You cannot build models using the Scoring Engine.
To install the ODM Scoring Engine, select during installation the ÒData Mining Scoring EngineÓ option, a custom install option for Oracle Data Mining.
A single model can be used to score large volumes of data, often in multiple geographically distributed application settings. Data analysis and model building might be performed by a small group of data mining experts using data from a centralized data warehouse. However, the model can be used by a much larger number of applications working with data at geographically dispersed sites using local data. Local data may consist of millions of records representing customers; therefore, it can make sense to move the model to where the data is.
In real-time applications such as call centers, models are often built in one environment and used in another. There may be one machine dedicated to model building, using large volumes of data to produce models on a daily basis. Several other machines may be dedicated to real-time scoring, receiving new models to support, for example, the call center application. Call center representatives collect information from callers; the collected information is then used to obtain predictions or recommendations for that particular caller in real time. Scoring in real time often requires that the model is moved to where the data is.
Oracle Data Mining supports data movement from one schema or database instance to another with native export and import.
Naive model export and import is based on Oracle Data Pump technology.
Native export is supported at three different levels, as follows:
When a full database is exported using the Oracle Data Pump Export Utility (expdp)
, all data mining models in the database are exported.
When a schema is exported using the Oracle Data Pump Export Utility (expdp)
, all data mining models in the schema are exported.
An ODM user can export one or more specific models in a schema using the PL/SQL DBMS_DATA_MINING.export_model
procedure or the Java task javax.datamining.task.ExportTask
.
Native import is also supported in all scenarios. Using the dump file set produced by the Oracle Data Pump Export Utility (expdp)
, an ODM user can run the Oracle Data Pump Import Utility (impdp)
to import all data mining models contained in the dump file set.
ODM users can import a specific model from the dump file set using the PL/SQL DBMS_DATA_MINING.import_model
procedure or the Java javax.datamining.task.ImportTask
.
You can also perform native export and import using the ODM Java interface; for an example, see the dmexpimpdemo.java
sample program.
For more information about native export and import, see the Oracle Data Mining Administrator's Guide, the DBMS_DATA_MINING chapter in the Oracle Database PL/SQL Packages and Types Reference, and the Oracle Data Mining Application Developer's Guide.
Suppose that the application builds a model on one system named BUILDSYS and applies the model on a different system named SCORESYS.
BUILDSYS must have ODM installed. ODM supports all data mining activities (building models, testing models, applying models, etc.). SCORESYS has the ODM Scoring Engine installed. It will not be possible to build models on SCORESYS, but it will be possible to apply the model. Note that SCORESYS could have a full ODM product installation, but model building may interfere with scoring performance.
The following processing takes place:
Build models on BUILDYSYS. Select the appropriate model to deploy.
Export the model using the ODM PL/SQL or Java interface.
Copy the dump file generated by model export to SCORESYS.
Import the model on SCORESYS using the ODM PL/SQL or Java interface.
Apply the model to data on SCORESYS.