Specifying Model Settings

Numerous configuration settings are available for configuring data mining models at build time. To specify settings, create a settings table with the columns shown in Table 5-7 and pass the table to CREATE_MODEL.


Table 5-7 Settings Table Required Columns

Column Name Data Type

setting_name

VARCHAR2(30)

setting_value

VARCHAR2(4000)


Example 5-1 creates a settings table for an SVM classification model. Since SVM is not the default classifier, the ALGO_NAME setting is used to specify the algorithm. Setting the SVMS_KERNEL_FUNCTION to SVMS_LINEAR causes the model to be built with a linear kernel. If you do not specify the kernel function, the algorithm chooses the kernel based on the number of attributes in the data.

Some settings apply generally to the model, others are specific to an algorithm. Model settings are documented in Oracle Database PL/SQL Packages and Types Reference and referenced in Table 5-8 and Table 5-9.


Table 5-8 General Model Settings

Settings Description

Mining function settings

See "Mining Function Settings" in Oracle Database PL/SQL Packages and Types Reference

Algorithm names

See "Algorithm Names" in Oracle Database PL/SQL Packages and Types Reference

Global model characteristics

See "Global Settings" in Oracle Database PL/SQL Packages and Types Reference

Automatic Data Preparation

See "Automatic Data Preparation" in Oracle Database PL/SQL Packages and Types Reference



Table 5-9 Algorithm-Specific Model Settings

Algorithm Description

Decision Tree

See "Algorithm Settings: Decision Tree" in Oracle Database PL/SQL Packages and Types Reference

Expectation Maximization

See "Algorithm Settings: Expectation Maximization" in Oracle Database PL/SQL Packages and Types Reference

Generalized Linear Models

See "Algorithm Settings: Generalized Linear Models" in Oracle Database PL/SQL Packages and Types Reference

k-Means

See "Algorithm Settings: k-Means" in Oracle Database PL/SQL Packages and Types Reference

Naive Bayes

See "Algorithm Settings: Naive Bayes" in Oracle Database PL/SQL Packages and Types Reference

Non-Negative Matrix Factorization

See "Algorithm Settings: Non-Negative Matrix Factorization" in Oracle Database PL/SQL Packages and Types Reference

O-Cluster

See "Algorithm Settings: O-Cluster" in Oracle Database PL/SQL Packages and Types Reference

Singular Value Decomposition

See "Algorithm Settings: Singular Value Decomposition" in Oracle Database PL/SQL Packages and Types Reference

Support Vector Machine

See "Algorithm Settings: Support Vector Machine" in Oracle Database PL/SQL Packages and Types Reference


Example 5-1 Creating a Settings Table for an SVM Classification Model

CREATE TABLE svmc_sh_sample_settings (
  setting_name VARCHAR2(30),
  setting_value VARCHAR2(4000));

BEGIN 
  INSERT INTO svmc_sh_sample_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.algo_name, dbms_data_mining.algo_support_vector_machines);
  INSERT INTO svmc_sh_sample_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.svms_kernel_function, dbms_data_mining.svms_linear);
  COMMIT;
END;
/