IDAX.PRINT_MODEL - Print a model

Use this stored procedure to print a model to get a summary of its most important characteristics. Thus, you get a quick overview of a model.

Authorities

The privileges held by the authorization ID of the statement must include at least one of the following authorities:

  • SELECT privilege on the source model
  • DATAACCESS authority

Syntax

IDAX.PRINT_MODEL(in parameter_string varchar(32672))

Parameter descriptions

parameter_string
Mandatory one-string parameter that contains pairs of <parameter>=<value> entries that are separated by a comma.
Data type: VARCHAR(32672)
The following list shows the parameter values:
model
Mandatory.
The name of the model that is to be printed.
You can qualify the value of the model parameter with a schema name as follows:
<schema name>.<model name>

Returned information

A printout as a result set.

The structure of the result set depends on the model type, that is, the algorithm, and the format and contents of the model tables.

Example

CALL IDAX.PRINT_MODEL('model=cc_nb_ewd');

Additional parameters for association rules models

outtable
Optional.
The name of the model table to which the patterns and rules are written.
Default: none
Data type: VARCHAR(128)
If no value is specified, the patterns or rules are only printed.
type
Optional.
The type of information to display.
Default: rules
Possible values are rules and patterns.
Data type: VARCHAR(8)
limit
Optional.
The maximum number of rules or patterns that are displayed.
Default: none
Range: >=1
Data type: INTEGER
If no value is specified, all rules or patterns are displayed.
itemsin
Optional.
A list of item names that must be contained in the rules or patterns that are displayed. The items are separated by semicolons. At least one of the listed items must be contained.
Default: none
Data type: VARCHAR(32000)
When the type=rules parameter is specified, the following conditions apply:
  • To indicate that the item must be contained in the head of the rule, the item names can be succeeded by :h or :head.
  • To indicate that the item must be contained in the body of the rule, the item names can be succeeded by :b or :body.
If this parameter is not specified, no constraint is applied.
itemsout
Optional.
A list of item names that must not be contained in the rules or patterns that are displayed. The items are separated by semicolons.
Default: none
Data type: VARCHAR(32000)
If this parameter is not specified, no constraint is applied.
minlen
Optional.
The minimum number of items that are to be displayed in the rules or patterns.
Default: 1
Range: >= 1 and <= maxlen
Data type: INTEGER
maxlen
Optional.
The maximum number of items that are to be displayed in the rules or patterns.
Default: the longest pattern of the model
Range: >= minlen
Data type: INTEGER
minsupport
Optional.
The minimum support for items that are to be displayed in the rules or patterns.
Default: 0.0
Range: >=0.0 and <=maxsupport
Data type: DOUBLE
maxsupport
Optional.
The maximum support for items that are to be displayed in the rules or patterns.
Default: 1.0
Range: >=minsupport and <=1.0
Data type: DOUBLE
minlift
Optional.
The minimum lift of the rules or patterns that are to be displayed.
Default: 0.0
Range: >=0.0 and <=maxlift
Data type: DOUBLE
maxlift
Optional.
The maximum lift of the rules or patterns that are to be displayed.
Default: the maximum lift of the patterns of the model
Range: >=minlift
Data type: DOUBLE
minconf
Optional.
The minimum confidence of the rules that are to be displayed.
Default: 0.0
Data type: DOUBLE
Range: >=0.0 and <= maxconf
You can specify this parameter only if the type=rules parameter is specified.
maxconf
Optional.
The maximum confidence of the rules that are to be displayed.
Default: 1.0
Data type: DOUBLE
Range: >=minconf and <= 1.0
You can specify this parameter only if the type=rules parameter is specified.
sort
Optional.
A list of keywords that indicate the order in which the rules or patterns are displayed. The order of the list is descending. The items are separated by semicolons.
Possible values are support, confidence, lift, and length.
Default if the type=rules parameter is specified: support;confidence;length
Default if the type=patterns parameter is specified: support;lift;length
Data type: VARCHAR(32000)

Returned information for association rules

The result set contains all rules or patterns that meet the defined constraints in the order that is specified in the sort parameter.

If the outtable parameter is specified, an output table that has the same content as the result set is created.

Additional parameters for K-means models

clusters
Optional.
The cluster IDs of the model that are to be printed.
The cluster IDs are separated by a semicolon (;).
If clusters is not specified, the cluster IDs for all clusters are printed.
columns
Optional.
The input column names of the model that are to be printed.
The input column names are separated by a semicolon (;).
If columns is not specified, the input column names for all input columns are printed.
mode
Optional.
The mode that determines which information of the model is to be printed.
Allowed values are preview, clusters, centers, statistics.
  • If mode=preview is specified, the printout shows a table with one row for each input column. The table has the columns mean (for numeric input columns) and mode (for nominal input columns) for each cluster and for the overall data, and one row for the size of each cluster.
  • If mode=clusters is specified, the printout shows a table with one row per cluster with the columns clusterid, name, size, withinss, and description.
  • If mode=centers is specified, the printout shows a table with one row per input column per cluster. The table has the columns clusterid, columnname, cardinality, mode, minimum, maximum, mean, variance, count, and importance. If the model is built with statistics=none, the table has the columns clusterid, columnname, mode (for nominal input columns), and mean (for numeric input columns).
  • If mode=statistics, the printout shows a table with one row per value of the input columns and per cluster with the columns clusterid, columnname, value, count, relfrequency, deviation, mean, and variance. If the model is built with statistics=none or statistics=columns, the table is empty.

Returned information for k-Nearest Neighbors (KNN)

The result set contains the column properties table that describes the ID, the target, and the input columns of the model table. Statistics are collected for all input columns.

Table 1. Result set columns
Column name Column type Description
COLNO INTEGER The rank of the column in the table
NAME VARCHAR(128) The name of the column
SQLTYPE VARCHAR(128) The SQL type of the column
LENGTH INTEGER The length of the SQL type of the column
SCALE SMALLINT The scale of the SQL type of the column
TYPE VARCHAR(64) The type of the column, that is, 'nom' or 'cont'
ROLE VARCHAR(64) The role of the column, that is, 'id', 'target', or 'input'
CARDINALITY BIGINT The number of distinct values of an input column
MINIMUM DOUBLE The minimum value of a continuous input column
MAXIMUM DOUBLE The maximum value of a continuous input column
MEAN DOUBLE The average value of a continuous input column
VARIANCE DOUBLE The variance of a continuous input column
NUMVALID BIGINT The number of valid values of an input column
NUMINVALID BIGINT The number of invalid values of an input column
NUMMISSING BIGINT The number of NULL values of an input column

Returned information for linear regression

The result set depends on the specified options for the model creation.

  • If the model is created with the calculatediagnostics parameter set to false, one result set is returned.
  • If the model is created with the calculatediagnostics parameter set to true, two result sets are returned. The second result set contains additional diagnostic information.
Table 2. Result set columns for result set 1
Column name Column type Description
PREDICTOR VARCHAR

Variable length that depends on the actual length of the predictor names

The name of the predictor, that is, the column that is specified as the active input column when the model is created

Nominal columns can contain several entries for the same predictor.

If the model is built with the intercept option set to true, an additional predictor '(Intercept)' is included in the result set. This predictor denotes the intercept that is included during the build process of the model.

PREDICTOR_LEVEL VARCHAR

Variable length that depends on the actual length of the predictor level names

For nominal columns, the name of the predictor level, that is, the value of the column from the input table for which the model is created

If the predictor is '(Intercept)' or of continuous data type, this column is intentionally left empty.

COEFFICIENT DOUBLE Coefficient of the predictor that is determined during model creation
STANDARD_DEVIATION DOUBLE Standard deviation of the predictor coefficient

If the calculatediagnostics parameter is set to false for the model creation, the value is -1.

Table 3. Result set columns for result set 2 that contains additional diagnostic information
Column name Column type Description
INDICATOR VARCHAR() Contains the following fixed values:
[Y_VAR_EST]
Estimators of a variance of the error term.
[RSS]
Residual sum of squares of the model.
[R²]
R-squared (coefficient of determination of the model).
VALUE DOUBLE Indicator value

Additional parameters for PCA models

mode
Optional.
The mode that determines which information of the model is to be printed.
Allowed values are standard and summary.
  • If mode=standard is specified, the printout shows two result sets.

    This mode allows for easy comparison to a PCA model that was created in R by using the functions 'prcomp()' and 'print()'.)

  • If mode=summary is specified, the printout shows one result set.

    This mode is analog to the 'summary()' function in R.

Default: standard

Returned information for PCA

The result set depends on the specified options for the model creation.

For mode=standard, the output is as follows:

Table 4. Result set 1 – standard deviations vector for principal components
Column name Column type Description
ID VARCHAR(3) Row index, always ‘[1]
PC<X> DOUBLE Standard deviation of principal component <X>, where X is a number of 1 <= n
Table 5. Result set 2 – matrix of variable loadings
Column name Column type Description
ID VARCHAR

Variable length that depends on the name of the input variables

Name of the input variable
PC<X> DOUBLE Eigenvector value of the principal component <X>, where X is a number of 1 <= n

For mode=summary, the output is as follows:

Table 6. Result set 1 - key statistics for principal components
Column name Column type Description
MEASURE VARCHAR(27) Contains only the fixed values standard deviation, proportion of variance, and cumulative proportion
PC<X> DOUBLE Indicator value for the principal component <X>, where X is a number of 1 <= n

Additional parameters for sequential patterns

outtable
Optional.
The name of the model table to which the patterns and rules are written.
Default: none
Data type: VARCHAR(128)
If no value is specified, the patterns or rules are only printed.
type
Optional.
The type of information to display.
Default: rules
Possible values are patterns and rules.
Data type: VARCHAR(8)
limit
Optional.
The maximum number of patterns or rules that are displayed.
Default: none
Range: >=1
Data type: INTEGER
If no value is specified, all rules or patterns are displayed.
itemsin
Optional.
A list of item names that must be contained in the patterns or rules that are displayed. The items are separated by semicolons. At least one of the listed items must be contained.
Default: none
Data type: VARCHAR(32000)
When the type=rules parameter is specified, the following conditions apply:
  • To indicate that the item must be contained in the head of the rule, the item names can be succeeded by :h or :head.
  • To indicate that the item must be contained in the body of the rule, the item names can be succeeded by :b or :body
If this parameter is not specified, no constraint is applied.
itemsout
Optional.
A list of item names that must not be contained in the patterns or rules that are displayed. The items are separated by semicolons.
Default: none
Data type: VARCHAR(32000)
If this parameter is not specified, no constraint is applied.
minlen
Optional.
The minimum number of items per pattern or rule that are to be displayed.
Default: 1
Range: >= 1 and <= maxlen
Data type: INTEGER
maxlen
Optional.
The maximum number of items per pattern or rule that are to be displayed.
Default: the longest sequential pattern of the model
Range: >= minlen
Data type: INTEGER
minsupport
Optional.
The minimum support of the patterns or rules that are to be displayed.
Default: 0.0
Range: >=0.0 and <=maxsupport
Data type: DOUBLE
maxsupport
Optional.
The maximum support of the patterns or rules that are to be displayed.
Default: 1.0
Range: >=minsupport and <=1.0
Data type: DOUBLE
minlift
Optional.
The minimum lift of the patterns or rules hat are to be displayed.
Default: 0.0
Range: >=0.0 and <=maxlift
Data type: DOUBLE
maxlift
Optional.
The minimum lift of the patterns or rules that are to be displayed.
Default: the maximum lift of the sequential patterns of the model
Range: >=minlift
Data type: DOUBLE
minconf
Optional.
The minimum confidence of the rules that are to be displayed.
Default: 0.0
Data type: DOUBLE
Range: >=0.0 and <= maxconf
You can specify this parameter only if the type=rules parameter is specified.
maxconf
Optional.
The maximum confidence of the rules that are to be displayed.
Default: 1.0
Data type: DOUBLE
Range: >=minconf and <= 1.0
You can specify this parameter only if the type=rules parameter is specified.
mintime
Optional.
The minimum time between the body and the head of the rules that are to be displayed.
If the transaction ID of the data sequences on which the model is built is of type date, time or time stamp, the value of this parameter is a number of seconds.
Default: 0.0
Data type: DOUBLE
Range: >0.0 and <= maxtime
You can specify this parameter only if the type=rules parameter is specified.
maxtime
Optional.
The maximum time between the body and the head of the rules that are displayed.
If the transaction ID of the data sequences on which the model is built is of type date, time or time stamp, the value of this parameter is a number of seconds.
Default: The maximum relative time of the rules of the model
Data type: DOUBLE
Range: >=mintime
You can specify this parameter only if the type=rules parameter is specified.
sort
Optional.
A list of keywords that indicate the order in which the rules or patterns are displayed. The order of the list is descending. The items are separated by semicolons.
Possible values are support, confidence, lift, length, and time.
Default if the type=rules parameter is specified: support;confidence;length
Default if the type=patterns parameter is specified: support;lift;length
Data type: VARCHAR(32000)

Returned information for sequential patterns

The result set contains all patterns or rules that meet the defined constraints in the order that is specified in the sort parameter.

If the outtable parameter is specified, an output table that has the same content as the textual representation is created.

Additional parameters for TwoStep clustering

clusters
Optional.
The cluster IDs of the model that are to be printed.
The cluster IDs are separated by a semicolon (;).
If clusters is not specified, the cluster IDs for all clusters are printed.
Data type: VARCHAR(ANY)
columns
Optional.
The input column names of the model that are to be printed.
The input column names are separated by a semicolon (;).
If columns is not specified, the input column names for all input columns are printed.
Data type: VARCHAR(ANY)
mode
Optional.
The mode that determines which information of the model is to be printed.
Allowed values are clusters, centers, and statistics.
Default: clusters
Data type: VARCHAR(ANY)

Returned information for TwoStep clustering

Text.PrettyPrint of the TwoStep clustering model.