6.2 About Model Settings

You can specify settings that affect the characteristics of a model.

Some settings are general, some are specific to an Oracle Machine Learning function (also referred to as a technique), and some are specific to an algorithm.

All settings have default values. If you want to override one or more of the settings for a model, then you must specify the settings with the **params parameter when instantiating the model or later by using the set_params method of the model.

If a parameter is specified by both OML4R algorithm parameters and odm.settings, the value in odm.settings is used.

The following table lists the OML4R parameters that is set by either odm.settings or ore.odm** algorithm explicit parameters.

Table 6-2 OML4R parameters

Setting Name OML4R SQL (DBMS_DATA_MINING)
ore.odmAI.R auto.data.prep PREP_AUTO
ore.odmAssocRules.R case.id.column CASE_ID_COLUMN_NAME
item.id.column ODMS_ITEM_ID_COLUMN_NAME
item.value.column ODMS_ITEM_VALUE_COLUMN_NAME
min.support ASSO_MIN_SUPPORT
min.confidence ASSO_MIN_CONFIDENCE
max.rule.length ASSO_MAX_RULE_LENGTH
ore.odmDT.R auto.data.prep PREP_AUTO
cost.matrix CLAS_COST_TABLE_NAME
impurity.metric TREE_IMPURITY_METRIC
max.depth TREE_TERM_MAX_DEPTH
min.rec.split TREE_TERM_MINREC_SPLIT
min.pct.split TREE_TERM_MINPCT_SPLIT
min.rec.node TREE_TERM_MINREC_NODE
min.pct.node TREE_TERM_MINPCT_NODE
ore.odmEM.R num.centers CLUS_NUM_CLUSTERS
auto.data.prep PREP_AUTO
ore.odmESA.R auto.data.prep PREP_AUTO
ore.odmESM.R auto.data.prep PREP_AUTO
ore.odmGLM.R weights ODMS_ROW_WEIGHT_COLUMN_NAME
type None in setting, it is mining_function
na.treatment ODMS_MISSING_VALUE_TREATMENT
reference GLMS_REFERENCE_CLASS_NAME
ridge GLMS_RIDGE_REGRESSION
ridge.value GLMS_RIDGE_VALUE
ridge.vif GLMS_VIF_FOR_RIDGE
auto.data.prep PREP_AUTO
ore.odmKMeans.R auto.data.preps PREP_AUTO
num.centers CLUS_NUM_CLUSTERS
block.growth KMNS_BLOCK_GROWTH
conv.tolerance KMNS_CONV_TOLERANCE
distance.function KMNS_DISTANCE
iterations KMNS_ITERATIONS
min.pct.attr.support KMNS_MIN_PCT_ATTR_SUPPORT
num.bin KMNS_NUM_BINS
split.criterion KMNS_SPLIT_CRITERION
ore.odmNB.R auto.data.prep PREP_AUTO
class.priors CLAS_PRIORS_TABLE_NAME
ore.odmNMF.R auto.data.prep PREP_AUTO
num.features FEAT_NUM_FEATURES
conv.tolerance NMFS_CONV_TOLERANCE
num.iter NMFS_NUM_ITERATIONS
rand.seed NMFS_RANDOM_SEED
allow.negative.scores NMFS_NONNEGATIVE_SCORING
ore.odmNN.R type None in setting, it is mining_function
auto.data.prep PREP_AUTO
ore.odmOC.R num.centers CLUS_NUM_CLUSTERS
max.buffer oclt_max_buffer
sensitivity OCLT_SENSITIVITY
ore.odmRF.R auto.data.prep PREP_AUTO
ore.odmSVD.R auto.data.prep PREP_AUTO
ore.odmXGB.R type None in setting, it is mining_function
auto.data.prep PREP_AUTO

For the _init_ method, the argument can be key-value pairs or a dict. Each list element’s name and value refer to a machine learning algorithm parameter setting name and value, respectively. The setting value must be numeric or a string.

The argument for the **params parameter of the set_params method is a dict object mapping a str to a str. The key should be the name of the setting, and the value should be the new setting.

Example 6-2 Specifying Model Settings

This example shows the creation of an Expectation Maximization (EM) model and the changing of a setting.


settings = list(
  EMCS_NUM_ITERATIONS= 20,
  EMCS_RANDOM_SEED= 7)

EM.MOD <- ore.odmEM(~.-CUST_ID, CUST_DF, num.centers = 3, odm.settings = settings)