Chapter 7. Using the Rules Visualizer

This chapter discusses the components and capabilities of the Rules Visualizer. It first provides an overview of this data mining and visualization tool, then it explains this tool's functionality when working with the

Finally, it lists and describes the provided sample files for these tools.

Overview of Rules Visualizer

The Rules Visualizer gives you the power to mine data by constructing, verifying, and graphically representing models of patterns in large databases. These patterns are expressed via association rules, which indicate the frequency of items occurring together in a database.

Discovering and graphically displaying association rules can be relevant to many enterprises, including supermarket inventory planning, shelf planning, and attached mailing in direct marketing.

The tool execution scenario described in Chapter 1 of this document (see Figure 1-1) is slightly modified for the Rules Visualizer. First, the “raw” data in your database must be converted into a specially formatted file that can be processed by the association rules generator part of the Rules Visualizer. When the association rules generator has processed this file, the results can be displayed by the rules visualizer part of this tool.

Thus, the Rules Visualizer consists of three operations:

  1. Data conversion. The association data converter processes a “raw” data file and creates a file usable by the association rules generator.

  2. Association rules generation. The data file created by the association data converter is processed by the association rules generator, which creates a file usable by the rules visualizer.

  3. Rules visualization. This operation displays the generated association rules.

In addition to the input data and rules file requirements, each operation requires a configuration file that specifies operational parameters.

The sequence of actions by the user, at the user's workstation, and at the host server is shown schematically in Figure 7-1. The phases indicated at the right of the illustration correlate to the operations listed above.

Figure 7-1. Execution Sequence of the Rules Visualizer


Data Conversion

The association data converter takes a “raw” data file, such as one resulting from a database query, and creates a binary data file in the format used by the association rules generator. The internal format of this generated file allows optimum processing by the rules generator.

Association Rules Generator

One example of applying the association rules generator is to obtain “market basket” data for customer buying patterns. Here, “market basket” is the set of items bought by each customer on a single visit to a store. An example rule in this context might be: “80% of the people that buy diapers buy baby powder.” This percentage is known as the predictability of the rule.

In the example, “diapers” is the item on the left-hand side (LHS) of the rule, and “baby powder” is the item on the right-hand side (RHS) of the rule.

Some applications of these rules are as follows:

  • If “Fizzy Pop” appears on the RHS, the LHS can help us determine what the store should do to boost sales of this beverage.

  • If “Bagels” appears on the LHS, the RHS can help us determine what products might be affected if the store no longer sells bagels.

The association rules generator part of this tool processes an input file, then generates an output file consisting of the rules. If X and Y are items in a record, then a rule such as

XY

indicates that whenever X occurs in a record, expect Y to occur with some frequency.

Components of a Generated Association Rule

The strength of the association is quantified by three numbers. The first number, the predictability of the rule, quantifies how often X and Y occur together as a fraction of the number of records in which X occurs. For example, if the predictability is 50%, X and Y occur together in 50% of the records in which X occurs. Thus, knowing that X occurs in a record, expect that 50% of the time Y occurs in that record.

The second number, the prevalence of the rule, quantifies how often X and Y occur together in the file as a fraction of the total number of records. For example, if the prevalence is 1%, X and Y occur together in 1% of the total number of records. The lower the prevalence, the more rules are generated, and the slower the performance of the tool might be.

Rules that meet a minimum prevalence threshold are important for two reasons:

  1. A rule might have business value only if a reasonably significant fraction of records support the rule. For example, if everyone who buys caviar also buys vodka, the rule Caviar ⇒Vodka has 100% predictability. However, if only a handful of people buy caviar, the rule might be of limited value to the retailer.

  2. A rule might not be statistically significant if a very small number of records support the rule. The rule might be due to chance, and it would not be prudent to make decisions based on such a rule.

You can specify a minimum prevalence threshold for the generated rules. The default minimum prevalence threshold is 1%. You can also specify a minimum predictability threshold for the generated rules. The minimum predictability threshold default is 50%.

The third number is expected predictability. The expected predictability is the frequency of occurrence of the RHS items. So the difference between expected predictability and predictability is a measure of the change in predictive power due to the presence of the LHS rule. Expected predictability gives an indication of what the predictability would be if there were no relationship between the items.

The Association Rules generator does not report rules in which the predictability is less than the expected predictability. In other words, a rule such as A->B is not reported if the frequency of A and B occurring together is less than the frequency of B alone.


Note: Given just Y and a rule of the form X ⇒ Y, nothing is known about X. Rules specify implications only from the LHS to the RHS.

Table 7-1 summarizes the three numbers that quantify the strength of each association rule.

Table 7-1. Association Rules Components

Measure

Description

Prevalence

Frequency of LHS and RHS occurring together.

Predictability

Fraction of RHS out of all items with LHS, or the prevalence divided by the frequency of occurrence of LHS items.

Expected Predictability

Frequency of occurrence of RHS items.


Hierarchical Data

The rules generator also works on hierarchical data, which includes a component that relates (or maps) data to new data at varying degrees of generality. The ability to handle hierarchical data allows rules to be generated at the desired level of generality.

For example, consider the hierarchy shown in Table 7-2. This hierarchical information, in addition to the “market basket” data that lists the products purchased in each record, allows rules to be generated at four levels. In contrast to rules learned at the lowest level, which relate specific products to each other, a rule at the highest level might be “Milk implies Bread.”

Table 7-2. Example of Hierarchical Levels

Level

Example

Product Group

Milk

Category

Non-Refrigerated Milk

Brand

Lucerne

Product ID (UPC/SKU Code)

1 pint can of Premium Condensed Milk


Rules Visualization

The rules visualization part lets you graphically display and explore the generated association rules. The rules are presented on a grid landscape, with left-hand side (LHS) items on one axis, and right-hand side (RHS) items on the other. As shown in Figure 7-2, attributes of a rule are displayed at the junction of its LHS and RHS item. The display can include bars, disks, and labels.

Figure 7-2. Detail View of the Rules Visualizer's Main Window


If the displayed view is too small, item labels do not appear on the side of the axes. You can zoom in on the view until the item labels appear (see the Dolly description in the “Thumbwheels” section).

A legend indicating the mapping between displayed attributes (such as bar heights and colors) and the values associated with the underlying rules (such as predictability and prevalence) can be displayed at the bottom of the main window.

File Requirements

Each of the Rules Visualizer's three components has its own file requirements. These are detailed in the following subsections.

Files Required by the Association Data Converter Part

  • A “raw” data file that results from extracting raw data from a source (such as a relational database). This file is processed by the association data converter to produce the internal binary data file used by the association rules generator.

  • A format file that specifies the format of the data file. If the internal binary data file (see next subsection) is created via the Tool Manager, this format file is created automatically. If the internal binary data file is created via the command line, this format file must be created manually (see Appendix D, “Creating Data and Configuration Files for the Rules Visualizer”).

Files Required by the Association Rules Generator Part

  • An internal binary data file, which results from running the association data converter on your original data.

    If you have hierarchical data, the association rules generator also requires the following two files:

  • A mapping file, which specifies the mapping between hierarchical levels.

  • A description file, which specifies a string description for each item at a specific hierarchical level.

Files Required by the Rules Visualization Part

  • A rules file that results from running the association rules generator.

  • A .ruleviz configuration file that specifies parameters used by the rules visualizer program (such as mapping colors to prevalence values) when displaying the generated rules. This file is easily created using the Tool Manager (see Chapter 3). You also can use an editor (such as jot, vi, or Emacs) to produce this file (see Appendix D, “Creating Data and Configuration Files for the Rules Visualizer”).

    These configuration files must have a .ruleviz extension.

Starting the Rules Visualizer

The Rules Visualizer has three components. The following subsections describe the procedure for starting each one.

Starting the Association Data Converter Part

There are two ways to start the association data converter part of the Rules Visualizer:

  • Use the Tool Manager to configure and start the data converter. (See Chapter 3 first for details on most of the Tool Manager's functionality, which is common to all MineSet tools; see below for details about using the Tool Manager in conjunction with the data converter.)

  • Enter the following command at the UNIX shell command-line prompt:

    assoccvt parameters 
    

    The parameters are described in Appendix D, “Creating Data and Configuration Files for the Rules Visualizer.”

Starting the Association Rules Generator Part

There are two ways to start the association rules generator part of the Rules Visualizer:

  • Use the Tool Manager to configure and start the association rules generator. (See Chapter 3 first for details on most of the Tool Manager's functionality, which is common to all MineSet tools; see below for details about using the Tool Manager in conjunction with the association rules generator.)

  • If the data with which you are working is non-hierarchical, enter this command at the UNIX shell command line prompt:

    assocgen parameters 
    

    If your data is hierarchical, enter this command at the UNIX shell command-line prompt:

    mapassocgen parameters 
    

    The parameters for both instances are described in Appendix D, “Creating Data and Configuration Files for the Rules Visualizer.”

Starting the Rules Visualization Part

There are five ways to start the rules visualization part of this tool:

  • Use the Tool Manager to configure and start the Rules Visualizer. (See Chapter 3 first for details on most of the Tool Manager's functionality, which is common to all MineSet tools; see below for details about using the Tool Manager in conjunction with the Rules Visualizer.)

  • Double-click the Rules Visualizer icon, which is in the MineSet page of the icon catalog. The icon is labeled ruleviz. Since no configuration file is specified, the start-up screen requires you to select one by using File > Open.

    Figure 7-3. Rules Visualizer Start-Up Screen With File Menu Pulled Down, and Open Selected


  • If you know what configuration file you want to use, double-click the icon for that configuration file. This starts the Rules Visualizer and automatically loads the configuration file you specified. This only works if the configuration filename ends in .ruleviz (which is always the case for configuration files created for the Rules Visualizer via the Tool Manager).

  • Drag the configuration file icon onto the Rules Visualizer icon. This starts the Rules Visualizer and automatically loads the configuration file you specified. This works even if the configuration filename does not end in .ruleviz.

  • Enter this command at the UNIX shell command-line prompt:

    ruleviz [ configFilename ]
    

When starting the rules visualization part of this tool, you must specify the configuration file, not the data or rules file.

Configuring the Rules Visualizer Using the Tool Manager

This section describes how the components of the Rules Visualizer can be configured using the Tool Manager. Although the Tool Manager greatly simplifies the task of configuring the Rules Visualizer, you can construct a configuration file for this tool using an editor (see Appendix D, “Creating Data and Configuration Files for the Rules Visualizer”).

Note that the steps required to connect to a data source are described in Chapter 3.

The sections below follow the configuration and invocation of the Rules Visualizer components in the conventional order:

  • creating a file for the association rules generator

  • generating rules

  • displaying rules

Setting Up Associations

To set up associations, use the example database table cars. Assume that you want to find out if there is an association between miles per gallon, horsepower, and the year the car was built. For example, did mileage improve over time? Did engines become less powerful? The following steps (and Figure 7-4) show you how to set up the associations and map table columns to the data you want to study.

Figure 7-4. Initial Tool Manager Window for Association Generation


  1. Specify a server name in the startup window; for this example, aztec.

  2. Select Database from the Data Source tab. Connect to the chosen DBMS by logging in with your username and password.

  3. Use either the Single Table or the SQL Query option to extract the information you want. For this example, choose the cars table from the correct database.

  4. (Optional step) In the Data Transformations tab you can choose the transformations you want do on the data before you give it to the associations engine. One recommended transformation is to create bins for numeric data. (The binning operation and the options available for it are described in detail in Chapter 3.) This leads to more “meaningful” rules from the association engine. For example, instead of using discrete values for the weightlbs attribute in the “cars” table such as 3504, 3693, 3436, 3433, and so on, it may be more meaningful to give weightlbs_bin value ranges such as 1600-2500, 2501-3500, and so on.

    For this example, click on the Bin Columns ... button, and select all the columns in the Bin Column window for binning.


    Note: If you run associations without binning any of the numerical columns (ints, floats, doubles) you get the warning message Running associations on unbinned non-categorical data. Binning is recommended for producing more useful results.


  5. Choose the Mining Tools tab from the Data Destination tab.

  6. Choose the Associations tab from the Mining Tools tab.

  7. At this point you can either have your data file converted to the associations internal binary format by clicking on the Assoc Convert Options button, or use a previously-converted binary file by selecting the Use server file checkbox. This example assumes you are creating a new binary file from your data file.

    Figure 7-5. Association Convert Options Dialog Box


    The database in the Current Columns text panel can contain multiple table columns. By mapping specific columns to association rules, the association rules generator can find the association between any possible pair of those items.

  8. The Map Columns to Items for Assoc window shows two panels:

    • Columns shows the columns in the data

    • Items shows a single item: Item 1

    The Map All button on this window can be used to map all the attributes in the data source to items for the associations engine. The Clear All and Clear Selected buttons can be used to clear/change the mapping between a column and an item.

    The default behavior is to map all columns to items. Therefore, if you omit this step or if you open this window, you find all columns mapped. For this example, click OK.

  9. Click the Run Convert button in the Associations tab to convert the data into an internal binary file. The name of the binary file created appears in the window (you can type in another name if you do not like the default provided by the Tool Manager).

For the cars data, you are setting up a binary file that lets you explore corollaries between different attributes of cars. The Tool Manager causes the information to be extracted from the database and converted to a binary format. As this procedure is executed, the message Waiting for server to create binary files appears. When this procedure is finished, the message Binary file created appears.

Applying Association Rule Options

After creating the binary file (or choosing a previously created one), you can run the Association Rules generator. You can choose options for this by clicking on the Assoc Options button. This causes the dialog box in Figure 7-6 to be displayed.

Figure 7-6. Association Rule Options Dialog Box


Prevalence—Lets you specify the minimum prevalence threshold as a percentage of the total number of records. The default is 1%. The possible values are 0–100.

Predictability—Lets you specify the minimum predictability threshold for rules. Rules with a predictability below this value are not generated. The default is 50%. The possible values are 0–100.

Sort Output By—Lets you specify how you want the output sorted, by one of the following:

  • the right hand side (RHS) of the rules

  • the left hand side (LHS) of the rules

  • predictability

  • prevalence

Click the buttons to specify which comes first, second, third, and so forth.

Once you have made your association rule options selections, click the OK button. This returns you to the Tool Manager startup screen.

To start generating rules based on the data you have chosen and the options you have configured, click the Run Assoc button on the Associations tab.

While the rules are being generated, the message Waiting for server to create rules file is displayed. When the process is finished, the rules file is downloaded to your local disk, and the message Rules file received from server is displayed. You are now ready to visualize these rules.

Mapping Columns to Visual Elements

The Rules Visualizer lets you map attributes of the rules to visual elements of the display. Clicking on the RuleViz Mappings button brings up the Ruleviz Mappings panel shown in Figure 7-7.

Figure 7-7. The Rules Visualizer's Mappings Panel


The visual elements that can be mapped are listed below:

  • Height - Bars—Lets you specify what the bar heights represent.

  • Height - Disks—Lets you specify what the disk heights represent.

  • Color - Bars—Lets you specify what the bar colors represent.

  • Color - Disks—Lets you specify what the disk colors represent.

  • Label - Bars—Lets you specify what the bar labels represent.

The default mappings are as follows:

  • predictability to bar heights

  • expected predictability to disk heights

  • prevalence to bar and disk colors

Specifying Ruleviz Options

Clicking on the Ruleviz Options button causes a new dialog box to be displayed (Figure 7-8). This lets you change some of the Rules Visualizer options from their default values.

Figure 7-8. Rule Visualizer Options Dialog Box


This dialog box has two panels: the top one lets you set options for bars and disks and the bottom one lets you specify options for items, the grid, and labels.

Items in the top panel are listed below:

  • Height button—Lets you specify whether the bars and disk heights are to be normalized so that the tallest bar equals the height field value (Max Height), or whether they are to be scaled by the height field value (Scale Height).

  • Height field—Lets you enter the maximum or scale value for bar and disk heights.

  • Hide Distance—Lets you specify the distance at which disks are not graphically represented. Smaller numbers in this field specify a shorter distance; this means fewer disks are shown and performance is greater. Larger numbers indicate a greater distance; this means disks are always visible.

  • Legends—Lets you enter a text string that appears as mapping information displayed at the bottom of the main Rules Visualizer window. This is information about mapping between display entities and data values (for example, bar height corresponds to predictability values).

  • Color list—Lets you add or edit a color. To add a color to the list, click the + button. To edit a color, click the color. See “Color Options for the MineSet Visualizers” in Chapter 3 for a more detailed explanation of how to choose and change colors.

  • Mapping—Lets you specify whether the color change that is shown in the graphic display is Continuous or Discrete. If you choose Continuous, the color values (of the bars or disks) shift gradually between the colors entered in the Color list field as a function of the values that are mapped to those colors in the Color list field.

Example 1:

If you

  • used the Color Browser to apply red and green (for bars and/or disks)

  • selected Discreet for the Mapping

  • entered the values 0 100

then the display shows all bars and/or disks with values of less than 50 in red, and all those with values greater than or equal to 50 in green.

Example 2:

If you

  • used the Color Browser to apply red and green (for bars and/or disks)

  • selected Continuous for the Mapping

  • entered the values 0 100

then the display shows all bars and/or disks with values less than or equal to 0 as completely red, those as greater than or equal to 100 as completely green, and those between 0 and 100 as shadings from red to green.

If no mapping and values are specified, a continuous mapping is used, and values are generated automatically from the minimum value to the maximum value in the data.

Items in the bottom panel are as follows:

  • Items On and Grids On checkbox buttons—Let you determine whether items (the names on the side of the grid) are displayed or hidden.

  • Size (for Items, Grid, and Bar Labels)—Lets you specify the size for items, the grid, and bar labels. If you mapped a column value to bar labels in the Requirements panel of the Tool Manager startup screen, you can specify a size for those labels.

  • Color (for Left-Hand Items, Right-Hand Items, Grid, and Bar Labels)—Lets you specify the color for LHS and RHS items, the grid, and bar labels. If you mapped a column value to bar labels in the Requirements panel of the Tool Manager startup screen, you can specify a size for those labels.

  • Hide Distance—Lets you specify the distance at which the LHS items, RHS items, grid, or labels become invisible. Smaller distances might improve performance, but the objects disappear more quickly. The higher the number, the greater the distance at which labels are hidden.

  • Message—Lets you specify the message displayed when the pointer is moved over an object or when an object is selected.

Invoking the Rules Visualizer

To see the Rules Visualizer graphically represent your data, click the Run RuleViz button at the bottom of the Associations tab in the Data Destination panel of the main Tool Manager window.

Working in the Rules Visualizer's Main Window

The Rules Visualizer part of this tool graphically displays the data in a rules file using the specifications of a valid configuration file. For example, specifying group.ruleviz results in the image shown in Figure 7-9.

Figure 7-9. Initial Rules Visualizer View When Specifying group.ruleviz


The rules are presented on a grid, initially displayed with left-hand side (LHS) items displayed on the left side of the window and right-hand side (RHS) items on the right. A rule is displayed at the junction of its LHS and RHS items. The display can include bars, disks, and labels.

When the scene is close enough, the LHS and RHS axes are labeled with the item names, unless this has been turned off in the configuration file. (To view the grid and rules at closer range, use the Dolly thumbwheel, described in the “Thumbwheels” section.)

You can change the labels as well as what the heights and colors of the bars and disks represent by modifying the configuration file via the Tool Manager (see Chapter 3) or using an editor to change the configuration file.

For example, in Figure 7-9, bar heights correspond to predictability values, bar colors correspond to prevalence values, and disk heights correspond to expected predictability.

Viewing Modes

The two modes of viewing are grasp and select. To toggle between these modes, press the Esc key. You also can change from one mode to the other by clicking the appropriate button: to enter select mode, left-click the arrow button (to the top right of the main window); to enter grasp mode, left-click the hand button (immediately below the arrow button, near the top right of the main window).

Grasp Mode

In grasp mode the cursor appears as a hand. This mode supports panning, rotating, and scaling the scene's size in the main window.

  • To rotate the display, press the left mouse button and move the mouse in the direction you want to rotate. (Also see the rotating controls Rotx and Roty described in “Thumbwheels”.)

  • To pan the display, press the middle mouse button and drag it in the direction you want the display panned.

  • To move the viewpoint forward, press the left and middle mouse buttons simultaneously and move the mouse downwards. To move the viewpoint backward, press the left and middle mouse buttons simultaneously and move the mouse upwards. This is equivalent to the functions provided by the Dolly thumbwheel.

Select Mode

In select mode, you can obtain additional information about a rule by placing the cursor over a bar. This highlights the selected bar and causes information about the rule represented by that bar to appear at the top of the main window.

Figure 7-10. Cursor Over a Rules Visualizer Object


The information is displayed as long as the cursor remains over the object. If you position the pointer cursor over an object and click the left mouse button, that same information appears in the Selection Window, which is above the main window, under the “Selection” label.

This Selection information remains visible until another object is selected, or until no object is selected (if you click the black background). Using the mouse, you can cut and paste this text into other applications, such as reports or databases.)

External Controls

Several external controls surround the graphics window. These consist of buttons, thumbwheels, and sliders.

Buttons

At the top right of the image area are eight buttons, shown in Figure 7-11.

Figure 7-11. Rules Visualizer External Buttons


  • Arrow puts you in select mode. When in this mode, the cursor shape is an arrow. Select mode lets you highlight graphical objects in the main window.

  • Hand puts you in grasp mode. When in this mode, the cursor shape is a hand. Grasp mode lets you rotate, zoom, and pan the display in the main window.

  • Viewer help brings up a help window describing the viewer itself.

  • Home takes you to a designated location. Initially, this location is the first viewpoint shown after invoking the Rules Visualizer and specifying a configuration file. If you have been working with the Rules Visualizer and have clicked the Set Home button, then clicking Home returns you to the viewpoint that was current when you last clicked Set Home.

  • Set Home makes your current location the Home location. Clicking the Home button returns you to the last location where you clicked Set Home.

  • View All lets you view the entire grid and all the rules, keeping the angle of view. To get an overhead view of the scene, rotate the camera so that you are looking directly down on the rules grid, then click the View All button. (To rotate the camera, see the description of the Rotx thumbwheel on page 213.)

  • Seek takes you to the point or object you click after selecting this button.

  • Perspective is a toggle button that lets you view the scene in 3D perspective (closer objects appear larger, farther objects appear smaller). Clicking this button toggles 3D perspective on (default setting) or off.


    Note: If perspective is off, the Dolly thumbwheel becomes the Zoom thumbwheel.


Thumbwheels

Three thumbwheels appear around the lower part of the graphics window border. They let you dynamically move the viewpoint.

Figure 7-12. Rules Visualizer Thumbwheels


  • The vertical thumbwheel Rotx (rotate about the x axis), on the left, rotates the display up and down.

  • The horizontal thumbwheel Roty (rotate about the y axis), at the bottom left, rotates the scene in the main window around its centerpoint left and right.

  • The vertical thumbwheel Dolly, on the right, moves the viewpoint forward and backward. Note that as you use the Dolly thumbwheel to magnify the scene in the main window, additional detail can appear. This is not the case with the Zoom slider, which merely enlarges the scene without adding detail.


    Note: If perspective is off, the Dolly thumbwheel becomes the Zoom thumbwheel.


The Height Slider

The Height slider, at the upper left corner of the main window, lets you scale the heights of objects (bars and disks) in the main window.

Figure 7-13. Rules Visualizer's Height Slider


Pulldown Menus

The Rules Visualizer has three pulldown menus, labeled File, Filter, and Help.

The File Menu

The File menu (Figure 7-14) contains three options.

Figure 7-14. Rules Visualizer File Menu


  • Open loads and opens a configuration file, displaying it in the main window. Previously displayed data is discarded.

  • Reopen reloads the current configuration file. This is useful if either the configuration file or data file has changed.

  • Exit closes the current window and exits the application.

The View Menu

The View menu (Figure 7-15)contains one option.

Figure 7-15. Rules Visualizer View Menu


Use Symmetric Axes controls how items are displayed along the left- and right-hand side axes. If enabled, every item appears on both axes, making the axes identical. Otherwise, only the required items appear on each axis.

The Filter Menu

The Filter menu brings up a Filter panel (Figure 7-16) that lets you reduce the number of rules displayed in the main viewing area, based on one or more criteria. You can use the filter panel to fine-tune the display, emphasize specific information, or simply shrink the amount of information displayed.

Figure 7-16. Rules Visualizer Filter Panel


The top pane lets you filter based on string variables, such as LHS and RHS. To select all values of a variable, click Set All. To clear the current selections, click Clear. To select a value, click it. To deselect a value, click it again.

The bottom pane lets you filter based on the values of both string and numeric variables.

To filter numeric values, enter the value, and select a relational operation (=, !=, >, <, >=, <=). To filter alphanumeric values, enter the string. You can use any of three types of string comparisons:

  • Contains indicates that it contains the appropriate string. For example, California contains the strings Cal and forn.

  • Equals requires the strings to match exactly.

  • Matches allows wildcards:

    • An asterisk (*) represents any number of characters.

    • A question mark (?) represents one character.

    • Square braces ([ ]) enclose a list of characters to match.

    For example, California matches Cal*, Cal?fornia, and Cal[a-z]fornia.

In addition to numeric and string comparison operations, you can specify Is Null. Currently, this option does not match any rules, resulting in an empty display.

To the right of each field is an additional option menu that lets you specify “And” or “Or” options. For example, you could specify “sales > 20 And < 40.” You can have any number of And or Or clauses for a given variable, but cannot mix And and Or in a single variable.

Click the Filter button to start filtering. If you press Enter while the panel is active, filtering starts automatically.

Click the Close button to close the panel.

The Help Menu

The Help menu (see Figure 7-17) provides access to five help functions.

Figure 7-17. Rules Visualizer Help Menu


  • Click for Help turns the cursor into a question mark. Placing this cursor over an object in the Rules Visualizer's main window and clicking the mouse causes a help screen to appear; this screen contains information about that object. Closing the help window restores the cursor to its arrow form and deselects the help function. The keyboard shortcut for this function is Shift+F1. (Note that it also is possible to place the arrow cursor over an object and press the F1 function key to access a help screen about that object.)

  • Overview provides a brief summary of the major functions of this tool, including how to open a file and how to interact with the resulting view.

  • Index provides an index of the complete help system. This option is currently disabled.

  • Keys & Shortcuts provides the keyboard shortcuts for all of the Rules Visualizer's functions that have accelerator keys.

  • Product Information brings up a screen with the version number and copyright notice for the Rules Visualizer.

  • MineSet User's Guide invokes the IRIS Insight viewer with the online version of this manual.

Sample Files

The provided sample data, rules, and configuration files demonstrate the features and capabilities of the Rules Visualizers.

Sample Files for the Association Data Converter

There are two sample files provided for each of the two formats of the association data converter. These files are located in the /usr/lib/MineSet/assoccvt/examples directory.

Sample Files for the Association Rules Generator

These files are located in the /usr/lib/MineSet/assocgen/examples directory. Except for the synthn.dsc file, the sample files for the association rules generator are provided in 2-byte and 4-byte integer versions. The difference between the respective files is that the 4-byte integer version requires twice the amount of storage space of the 2-byte integer version.

  • synthn.dsc
    This is a description file for items at the nth level of the hierarchy. For example, if n is 0, this file describes the lowest level; if n = 1, the file describes the next higher level of the hierarchy, and so forth. Description files are common to both 2-byte and 4-byte integer files.

Two-byte Integer Version

  • synths.dat
    This is a data file with 2-byte integers. It corresponds to the data shown in Table D-9.

  • synths.map
    This is a 2-byte integer mapping file for hierarchical data.

Four-byte Integer Version

  • synthb.dat
    This is a data file with 4-byte integers. It corresponds to the data shown in Table D-9.

  • synthb.map
    This is a 4-byte integer mapping file for hierarchical data.

Sample Files for the Rules Visualization Part

The following sample rules and configuration files are provided for use with the rules visualization part of this tool. These files correspond to the hierarchical datasets. Rules files contain the generated rules obtained by running the association rules generator part of the Rules Visualizer. Rules files must have a .rules extension. Each configuration file specifies how the corresponding rules file is displayed. Configuration files must have a .ruleviz extension. The files mentioned in this subsection are in the /usr/lib/MineSet/ruleviz/examples directory.

  • group.rules and group.ruleviz

    These files provide the generated rules and configuration specifications for product groups, such as bread and baked goods, dairy milk, and carbonated beverages.

  • category.rules and category.ruleviz

    These files provide the generated rules and configuration specifications for product categories within product groups, such as refrigerated or non-refrigerated milk.

  • people94.rules and people94.ruleviz

    These files provide the generated rules and configuration specifications for a census database, showing associations among marital status, education level, age, income, and other variables.

  • germanCredit.rules and germanCredit.ruleviz

    These files provide the generated rules and configuration specifications for a credit database from Germany, showing associations among credit history, employment, savings, and other variables.

See /usr/lib/MineSet/ruleviz/examples/README for additional information on the files in that directory.