BOOLRULE Procedure

PROC BOOLRULE Statement

  • PROC BOOLRULE DATA=libref.data-table <options>;

The PROC BOOLRULE statement invokes the procedure. Table 1 summarizes the options in the statement by function. The options are then described fully in alphabetical order.

Table 1: PROC BOOLRULE Statement Options

Option Description
Basic Options
DATA= Specifies the input data table (which must be in transactional format) for rule extraction
DOCID= Specifies the variable in the DATA= data table that contains the document ID
DOCINFO= Specifies the input data table that contains information about documents
GNEG= Specifies the minimum g-score needed for a negative term to be considered for rule extraction
GPOS= Specifies the minimum g-score needed for a positive term or a rule to be considered for rule extraction
MAXCANDIDATES= Specifies the number of term candidates to be selected for each category
MAXTRIESIN= Specifies the k Subscript normal i normal n value for k-best search in the term ensemble process for creating a rule
MAXTRIESOUT= Specifies the k Subscript normal o normal u normal t value for k-best search in the rule ensemble process for creating a rule set
MINSUPPORTS= Specifies the minimum number of documents in which a term needs to appear in order for the term to be used for creating a rule
MNEG= Specifies the m value for computing estimated precision for negative terms
MPOS= Specifies the m value for computing estimated precision for positive terms
TERMID= Specifies the variable in the DATA= data table that contains the term ID
TERMINFO= Specifies the input data table that contains information about terms


You must specify the following option:

DATA=libref.data-table
DOC=libref.data-table

names the input data table for PROC BOOLRULE to use. libref.data-table is a two-level name, where

libref

refers to a collection of information that is defined in the LIBNAME statement and includes the library, which includes a path to the data, and a session identifier, which defaults to the active session but which can be explicitly defined in the LIBNAME statement. For more information about libref, see the section Using CAS Sessions and CAS Engine Librefs.

data-table

specifies the name of the input data table.

Each row of the input data table must contain one variable for the document ID and one variable for the term ID. Both the document ID variable and the term ID variable can be either a numeric or character variable. The BOOLRULE procedure does not assume that the data table is sorted by either document ID or term ID.

You can also specify the following options:

DOCID=variable

specifies the variable that contains the ID of each document. The document ID can be either a number or a string of characters.

DOCINFO=libref.data-table

names the input data table that contains information about documents. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the input data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

Each row of the input data table must contain one variable for the document ID. The BOOLRULE procedure uses the document ID in the DATA= data table to search for the document ID variable in this data table to obtain information about documents (for example, the categories of each document).

GNEG=g-value

specifies the minimum g-score needed for a negative term to be considered for rule extraction in the term ensemble. If you do not specify this option, the value that is specified for the GPOS= option (or its default value) is used. For more information about g-score, see the section g-Score.

GPOS=g-value

specifies the minimum g-score needed for a positive term to be considered for rule extraction in the term ensemble. A rule also needs to have a g-score that is higher than g-value to be considered in the rule ensemble. The g-value is also used in the improvability test. A rule is improvable if the g-score that is computed according to the improvability test is larger than g-value. By default, GPOS=8.

MAXCANDIDATES=n
MAXCANDS=n

specifies the number of term candidates to be selected for each category. Rules are built by using only these term candidates. By default, MAXCANDS=500.

MAXTRIESIN=n

specifies the k Subscript normal i normal n value for the k-best search in the term ensemble process for creating rules. For more information, see the section k-Best Search. By default, MAXTRIESIN=150.

MAXTRIESOUT=n

specifies the k Subscript normal o normal u normal t value for the k-best search in the rule ensemble process for creating a rule set. For more information, see the section k-Best Search. By default, MAXTRIESOUT=50.

MINSUPPORTS=n

specifies the minimum number of documents in which a term needs to appear in order for the term to be used for creating a rule. By default, MINSUPPORTS=3.

MNEG=m

specifies the m value for computing estimated precision for negative terms. If you do not specify this option, the value specified for the MPOS= option (or its default value) is used.

MPOS=m

specifies the m value for computing estimated precision for positive terms. By default, MPOS=8.

TERMID=variable

specifies the variable that contains the ID of each term. The variable can be either a number or a string of characters. If the TERMINFO= option is not specified, variable is also used as the label of terms.

TERMINFO=libref.data-table

names the input data table that contains information about terms. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the input data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

Each row of the input data table must contain one variable for the term ID. If you specify this option, you must use the TERMINFO statement to specify which variables in the data table contain the term ID and the term label, respectively. The BOOLRULE procedure uses the term ID in the DATA= data table to search for the term ID variable in this data table to obtain information about the terms. If you do not specify this option, the content of the TERMID= variable is also used as the label of terms.

Last updated: August 06, 2026