IDAX.COLUMN_PROPERTIES - Create a column properties table

Use this stored procedure to create a column properties table.

Note: This feature is available starting from Db2® version 11.5.4.

All columns are set by default, that is, numeric types are set to continuous as shown in the following example.

call IDAX.COLUMN_PROPERTIES('intable=SAMPLES.CensusIncome, outtable=colPropertiesCensus');

The table defines also a role for each column.

The following roles are valid:

id
The column is an identifier.
target
The column is a target value.
ignore
The column is ignored.
objweight
The column contains weights of objects, that is, records of the input table. Some algorithms support object weights and use the data in this column, whereas other algorithms ignore them.
input
The column is an input column. This role is the default role for a column of the input table.
group
The column defines groups of records.
order
The column defines an order for the records.

The following example shows how to create a column properties table by using the coldeftype parameter and the incolumn parameter in combination with default values and overrides to default values.

call IDAX.COLUMN_PROPERTIES('intable=SAMPLES.Iris,
outtable=colPropertiesIris, coldeftype=cont, 
incolumn=id:id; class:nom; petallength:ignore; petalwidth:ignore');

The IDAX.COLUMN_PROPERTIES() procedure creates a new table as shown in the following example. The example shows only the columns that contain data. The columns that contain NULL values are not shown.

The default value for the SQLTYPE column, the LENGTH column, and the SCALE column is based on the column data type that is read from the table definition in the system catalog. The value for the WEIGHT column is set to 1 by default.


COLNO       NAME         SQLTYPE  LENGTH      SCALE  TYPE   ROLE     WEIGHT
----------- ------------ -------- ----------- ------ ------ -------- --------
0           ID           INTEGER  4           0      cont   id       1
1           SEPALLENGTH  REAL     4           0      cont   input    1
2           SEPALWIDTH   REAL     4           0      cont   input    1
3           PETALLENGTH  REAL     4           0      cont   ignore   1
4           PETALWIDTH   REAL     4           0      cont   ignore   1
5           CLASS        VARCHAR  12          0      nom    input    1

You can modify this table and use it as a column properties table.

Parameter descriptions

intable
Mandatory.
The name of the input table.
Data type: VARCHAR(128)
outtable
Mandatory.
The name of the decision tree model that is to be built.
The output table that contains the column properties data.
coldeftype
Optional.
The name of the input table.
The default type of the input table columns.
Allowed values are nom and cont.
If the parameter is not specified, numeric columns are continuous, and all other columns are nominal.
Default: none.
coldefrole
Optional.
The default role of the input table columns.
Allowed values are input and ignore.
If the parameter is not specified, all columns are input columns.
Default: input
Data type: VARCHAR(8)
incolumn
Optional.
The columns of the input table that have specific properties, which are separated by a semi-colon (;).
Data type: VARCHAR(128)
Each column is succeeded by one or more of the following properties:

By type nominal (:nom), or by type continuous (:cont). By default, numerical types are continuous, and all other types are nominal. By role: id,:target,:input, or:ignore.

If this parameter is not specified, all columns of the input table have default properties.
Default: none
Data type: VARCHAR(32000)
withstatistics
Optional.
A flag that indicates whether statistical properties of the columns should be collected.
Default: false
Data type: BOOLEAN