DDL in DBMS_DATA_MINING

Table 2-3 describes the DDL operations for mining models.


Table 2-3 DDL for Mining Models

DDL DBMS_DATA_MINING Description

Create model

CREATE_MODEL

Creates a model

Drop model

DROP_MODEL

Drops a model

Rename model

RENAME_MODEL

Renames a model

Add cost matrix

ADD_COST_MATRIX

Adds a cost matrix to a classification model

Remove cost matrix

REMOVE_COST_MATRIX

Removes the cost matrix from a classification model

Alter reverse expression

ALTER_REVERSE_EXPRESSION

Alters the reverse transformation expression associated with a model


The DBMS_DATA_MINING package contains a number of functions that return information about mining models. For example, the query in Example 2-4 returns details about feature 1 of the feature extraction model named NMF_SH_Sample.

Example 2-4 Sample Model Details Query

SELECT F.feature_id,
       A.attribute_name,
       A.attribute_value,
       A.coefficient
  FROM TABLE(DBMS_DATA_MINING.GET_MODEL_DETAILS_NMF('NMF_SH_Sample')) F,
       TABLE(F.attribute_set) A
WHERE feature_id = 1
  AND attribute_name in ('AFFINITY_CARD','AGE','COUNTRY_NAME')
ORDER BY feature_id,attribute_name,attribute_value;