Confirmation button

By pressing this button user confirms actual parameters’ values setting and the process of exporting data into a text file will continue.


Cancel button

By pressing this button user cancels the process of exporting data into a text file.


Button 15 rows back

This button enables the user to change the actual starting position of the previewed part of the text file. It will be shifted 15 lines backward (i.e. in direction to the beginning of the text file). If first 15 lines (or less in case of shorter files) of the text file are previewed, this button is disabled.


Preview area for exported text file

This area is dedicated to display content of the text file to be generated by actual parameters’ setting.


This button enables the user to change the actual starting position of the previewed part of the text file. It will be shifted 15 lines forward (i.e. in direction to the end of the text file). If last 15 lines (or less in case of shorter files) of the text file are previewed, this button is disabled.


Panel Fixed length.

If user selects this separator, columns will have fixed length. User can directly type required length value or increase/decrease already presented value using control buttons.


Panel Tabulator.

If user selects this separator, column separation will be realized by means of tabulator. The number of tabulators which will be putted into the text file after each data item can user type directly or increase/decrease already presented value using control buttons.


Panel Space.

If user selects this separator, column separation will have fixed length. Length is the value, which specifies number of spaces that will be putted into the text file after each data item. User can directly type this value or increase or decrease already presented value using control buttons.


Panel Arbitrary symbol.

If user selects this separator, column separation will be realized by means of specified character. User must specify this character, number of its occurrences, and number of spaces before and after given characters. These values are given within the next text fields. User can directly type these values or increase or decrease already presented values using control buttons.


Empty value tag

User can type here a string, which will be used for replacement of empty item values in the exported text file.


String delimiter

User can specify here a character – delimiter, which will delimit all string values in the exported text file. It applies only to string typed items.


Column index.

If user selects this parameter, (after clicking on the Apply... button) new column with specific meaning will be added at the beginning of the active view table. Values in this column will index (in ascending order) all rows in the active view table. User must set starting index value in the appropriate text field. User can directly type this value or increase/decrease already presented value using control buttons.


Data selection.

User can choose which rows and columns will be exported. If this box is checked, only selected rows or columns will be used for exporting. If active view table does not contain any selected rows or columns then appropriate check boxes are disabled.


Commentary.

If user selects this parameter, (after clicking on the Apply... button) additional line(s) with user defined text information (commentary) will be added to the exported text file. Size of this line is unlimited. Moreover, user can insert a counter into commentary text. Number of such counters is also unlimited. User can also set the repeating period. If user sets repeating period to zero, only one line with given commentary will be added. Finally, user can decide whether commentary lines will start from the very beginning or not.


KDD Package

Copyright © 1999-2001
Marek Hubal, Peter Bednar, Peter Kocan
Dept. of Cybernetics and AI
University of Technology Kosice,
Letna 9, 042 00 Kosice, Slovak Republic

You can freely use and distribute this software but please inform us about your experience with using this software, suggested improvements or bug reports at the following e-mail address: paralic@tuke.sk.


About KDD Package program


This is a main window of KDD Package:

The main window consists of six parts:


Application


 KDD Package has been programmed in the Borland Builder C++ enviroment. It uses for as database access enviroment the BDE - Borland Database Engine. User can configure BDE using BDE Administrator. This tool is used for setting aliases, ODBC dirvers etc. This function runs the BDE Administrator.


BDE Administrator


Buttons on the tool bar provide quick access to the often used functions. In the basic configuration button bar contains the following buttons:

Create from SQL command... - Function will create a new view using SQL command, which is created by use of built-in wizard.

Load - Function loads a previously saved view.

Save - Function saves the active view to a file.

Delete - Submenu contains two items with following meaning:
Actual - Function deletes the active view.
All - Function deletes all opened views.

Import - Submenu contains four items with following meaning:
DBASE table - Function for creating of a new view using import function from a DBASE table.
Paradox table - Function for creating of a new view using import function from a Paradox table.
Text file - Function for creating of a new view using import function from a text file.
Program Excel - Function for creating of a new view using data obtained from Microsoft Excel program.

Export - Submenu contains five items with following meaning:
DBASE table - Function for exporting data from the active view to a DBASE table.
Paradox table - Function for exporting data from the active view to a Paradox table.
Text file - Function for exporting data from the active view to a text file.
Excel table - Function for exporting data from the active view to the Microsoft Excel program.
Excel program - Function for exporting data from the active view to a Microsoft Excel table.

Row selection - Submenu contains nine items:
Select actual row - Function assignes actual row with the active selection type.
Deselect actual row - Function removes assignment of the actual row.
Select all - Function assignes all rows with the active selection type.
Select all unselected - Function assignes all not currently assigned rows with the active selection type.
Deselect all - Function removes assignment of all rows.
Deselect all of actual type - Function removes assignment of all rows that are assigned with active selection type.
Invert selection - Function inverts assignment of all rows in the table with respect to the selection type. Rows assigned with actual selection type become unassigned and opposite (rows assigned with other selection types remain unaffected).
Invert selection without reference to type - Function inverts assignment of all rows in the table without respect to the selection type. Rows assigned with actual selection type become unassigned and all other rows become assigned with actual selection type.
Special - Special selection or sampling procedures:
Select multiple rows - Function can select multiple block of rows (useful when processing data from data warehouses).

Insert row - Function inserts new row with empty values at the actual row position.

Delete row - Functions for deleting rows:
Actual - Function for deleting of the actual row.
Selected - Function for deleting of all rows that are selected with the active selection type.

Column selection - Submenu contains eight items:
Select actual column - Function assignes actual column with the active selection type.
Deselect actual column - Function removes assignment of the actual column.
Select all - Function assignes all columns with the active selection type.
Select all unselected - Function assignes all not currently assigned columns with the active selection type.
Deselect all - Function removes assignment of all columns.
Deselect all of actual type - Function removes assignment of all columns that are assigned with active selection type.
Invert selection - Function inverts assignment of all columns in the table with respect to the selection type. Columns assigned with actual selection type become unassigned and opposite (columns assigned with other selection types remain unaffected).
Invert selection without reference to type - Function inverts assignment of all columns in the table without respect to the selection type. Columns assigned with actual selection type become unassigned and all other columns become assigned with actual selection type.

Insert column - Function inserts new column with empty values to the actual column position.

Delete column - Functions for deleting columns:
Actual - Function for deleting of the actual column.
Selected - Function for deleting of all columns that are selected with active selection type.


Tool bar


There are all functions that work with columns. They can be divided into four groups:

Change active selection type:

Type 1 - Set active selection type to type 1.
Type 2 - Set active selection type to type 2.
Type 3 - Set active selection type to type 3.
Type 4 - Set active selection type to type 4.

Functions for column selection:

Select/Deselect actual column - Function assignes/removes assignment of actual column with the active selection type.
Select all - Function assignes all columns with the active selection type.
Select all unselected - Function assignes all not currently assigned columns with the active selection type.
Deselect all - Function removes assignment of all columns.
Deselect all of actual type - Function removes assignment of all columns that are assigned with active selection type.
Invert selection - Function inverts assignment of all columns in the table with respect to the selection type. Columns assigned with actual selection type become unassigned and opposite (columns assigned with other selection types remain unaffected).
Invert selection without reference to type - Function inverts assignment of all columns in the table without respect to the selection type. Columns assigned with actual selection type become unassigned and all other columns become assigned with actual selection type.

Functions that work with clipboard:

Copy to... - Function copies selected columns to the clipboard.
Move to... - Function moves selected columns to the clipboard.
Add from... - Function adds new columns from clipboard at the end of the active view table.

Other functions:

Insert - Function inserts new column with empty values to the actual column position.
Delete - Functions for deleting columns:
Delete actual - Function for deleting of the actual column.
Delete selected - Function for deleting of all columns that are selected with active selection type.
Edit item - Function enables editing of the value of the actual item.
Replace items - Function replaces item values in the actual column by another value.
Rename column - Function simply renames actual column.
Split column - Function splits a column into several others.


Column functions - Overview


 Clipboard is dedicated to temporary storage of blocks of data from view tables. User can copy or move to the clipboard only data blocks as several rows or columns. Notice, there is only one clipboard available. There are three functions that work with columns and clipboard:

1. Copy columns to clipboard
2. Move columns to clipboard
2. Add columns from clipboard


 Function copies all columns assigned with active selection type to the clipboard. This operation can take more time if the number of rows or columns is high. The user is informed about work progress in the panel Operations.


 Function copies all columns assigned with active selection type to the clipboard. Afterwards, all selected columns are deleted from the active view table. This operation can take more time if the number of rows or columns is high. The user is informed about work progress in the panel Operations.


 Function copies current content of the clipboard as new columns at the end of the active view table. If the number of rows in clipboard is less than the number of rows in the active view table, items in the remaining part of rows become empty values. In other case, function copies as many rows from the clipboard to the active view table as many rows are presented there. Values of statictical variables for each new column are updated automatically. This operation can take more time if the number of rows or columns is high. The user is informed about work progress in the panel Operations.


Columns and clipboard - Overview


Columns and clipboard - Copy to clipboard


Columns and clipboard - Move to clipboard


Columns and clipboard - Add from clipboard


 Function deletes column(s) from the active view table. Two functions are provided:

1. Delete actual column
2. Delete selected columns


 Function deletes actual column (column, where the cursor is currently positioned) from the active view table. This operation can take more time if the number of rows is high.


 Function deletes all columns that are assigned with active selection type from the active view table. This operation can take more time if the number of rows or columns is high. The user is informed about work progress in the panel Operations.


Delete columns - Overview


Delete actual column


Delete selected columns


 Function inserts new column to the actual column position. All values in the new column are empty.


Insert new column


 Columns int the active view can be assigned with four various selection types. KDD Package offers various functions for selection of columns. From the most simple one, which is select one column up to the special, more complicated slection functions. These special functions are often dedicated to special algorithms for data maining and as such their number can be increased when a new module is plugged into the KDD Packge.

In the basic configuration the following functions are provided:

Select/Deselect actual column - Function assignes/removes assignment of actual column with the active selection type.
Select all - Function assignes all columns with the active selection type.
Select all unselected - Function assignes all not currently assigned columns with the active selection type.
Deselect all - Function removes assignment of all columns.
Deselect all of actual type - Function removes assignment of all columns that are assigned with active selection type.
Invert selection - Function inverts assignment of all columns in the table with respect to the selection type. Columns assigned with actual selection type become unassigned and opposite (columns assigned with other selection types remain unaffected).
Invert selection without reference to type - Function inverts assignment of all columns in the table without respect to the selection type. Columns assigned with actual selection type become unassigned and all other columns become assigned with actual selection type.


 This function depends on the current state of the actual column (where the cursor is currently positioned) in the active view table.
  1. If the actual column is currently not assigned with any selection type, then it will be assigned with the active selection type.
  2. If the actual column is already assigned with other selection type than the currently active selection type is, then its old assignment will be removed and the actual column will be assigned with the active selection type.
  3. Otherwise, i.e. in case that the actual column is already assigned with the currently active selection type, this assignment will be removed.


 Function assignes all columns with the active selection type. If some column is already assigned with different selection type as the currently active selection type is, then its old assignment will be removed and the actual column will be assigned with the active selection type.


 Function assignes all not currently assigned columns with the active selection type. If some column is already assigned with other selection type than the currently active selection type is, then this assignment will not be changed.


 Function removes assignment of all columns (does not matter with which selection type particular columns have been assigned). As result of this function, no column in active view table will be assigned with any selection type.


 Function removes assignment of all columns that are assigned with active selection type. If some column is already assigned with other selection type than the currently active selection type is, then its assignment will not be changed.


 Function inverts assignment of all columns in the active view table with respect to their current assignment with particular selection type.
  1. If a column is not assigned with any selection type, then this column will be assigned with currently active selection type.
  2. If a column is already assigned with currently active selection type, then this assignment will be removed.
  3. Otherwise, i.e. if a column is already assigned with other selection type than the currently active selection type is, this assignment will stay unchanged.


 Function inverts assignment of all columns in the active view table without respect to their current assignment with particular selection type. Columns assigned with actual selection type become unassigned and all other columns become assigned with actual selection type.


Column select functions - Overview


Select/Deselect column


Select all columns


Select all unselected columns


Deselect all columns


Deselect all columns of actual type


Invert column selections


Invert column selections without reference to type


 Function displays window that contains all visual components for settings configuration parameters. These parameters are used to setting up application visual appearance, functionality, module management etc.

In basic configuration the window contains three main pages:

Module management
Temporary directory
Colors


This page allows user to set up, which external modules will be loaded into the current KDD Package.

User can add new module to current module list using button Add. Likewise, in order to delete a module from the list user needs to use button Delete. Button Clear deletes all modules presented in the current list.
KDD Package checks the module file whether it is correct application module. If it is correct, then application adds this module to the current list and its functionality may be used within the KDD Package.


This page allows user to set up directory on the hard drive that will be used to store KDD Package temporary files.

User can either type directly suitable directory path into appropriate text box or choose directory path using built-in directory path manager.


This page allows user to set up colors of table used to display view data. See View mode - Data.

User can set color that is used to depict selected rows or columns. Application uses eleven selection colors: unselected, selected with type 1, 2, 3 and 4 and selected with pair-combinations of selection types. In order to set color user needs to click to the area placed on the right hand side. This area is colored by currently selected color.


Configuration - Overview


Module management


Temporatory directory


Colors


This function enables user to edit the value of actual item in the active view table. The following form is presented:

Form contains three components for different ways of item value modification and two buttons.

- If user checks this check box, then the value of actual item in the view table becomes empty.

- If this check box is checked, then user can choose one value from the list of all possible values of the actual column (only applicable for nominal attributes), which will be the new value of the actual item.

- If this check box is checked, then value typed into the edit box component will be the new value of the actual item.

- Clicking on this button will cancel the edit operation.

- Clicking on this button will confirm that the new value is valid and the application will save this new value. Values of statictical variables for appropriate column will be updated automatically.


Edit item


This form allows user to select data to be exported. Selected data will be defined by means of rows and columns selection.

This form is divided into two areas and provides two buttons.

Checkbox All rows:

If this checkbox is checked, all rows in the active view table will be used for the export procedure.

Checkbox All columns:

If this checkbox is checked, all columns in the active view table will be used for the export procedure.

Row selection type

If this checkbox is not checked, user must choose which rows will be used for export procedure.

Row select type

If this checkbox is not checked, user must choose which columns will be used for export procedure.

Cancel button:

Clicking on this button will close this form and cancel the operation.

Confirmation button:

By clicking on this button user confirms actual selection settings.


Choosing rows and columns for the export


Data export to a DBASE table consists of the following steps:

1. Selection of appropriate function from the application menu.

Functions for data export are located in submenu View --> Export of the main application menu. Item DBASE table that invokes desired function is placed in next submenu. See also Main menu.

2. Selecting of rows and columns.

For selecting appropriate data by means of rows and columns application provides the form Selecting of rows and columns for the export.... This form allows user to select rows and columns intended to be exported.

3. Setting output file name.

Application provides standard "Save as ..." form for setting output DBASE file name. After proper file name setting export process of selected data will continue.


This form allows user to choose which rows and columns will be used for export procedure:

Form is divided to two areas. It has two buttons too.

Checkbox All rows:

If this checkbox is checked, then all rows in the view are used for the export procedure.

Checkbox All columns:

If this checkbox is checked, then all columns in the view are used for the export procedure.

Row select type

If the upper checkbox is not checked, then user need to choose which rows will be used for export procedure.

Column select type

If the upper checkbox is not checked, then user need to choose which columns will be used for export procedure.


Data export to DBASE table


Choosing rows and columns for the export...


Data export to the Microsoft Excel program consists of the following steps:

1. Selection of appropriate function from the application menu.

Functions for data export are located in submenu View --> Export of the main application menu. Item Program Excel that invokes desired function is placed in next submenu. See also Main menu.

2. Selecting of rows and columns.

For selecting appropriate data by means of rows and columns application provides the form Selecting of rows and columns for the export.... This form allows user to select rows and columns intended to be exported.

After successful selection of data the export process will continue.


Data export to Microsoft Excel program


Data export to a Microsoft Excel table consists of the following steps:

1. Selection of appropriate function from the application menu.

Functions for data export are located in submenu View --> Export of the main application menu. Item Excel table that invokes desired function is placed in next submenu. See also Main menu.

2. Selecting of rows and columns.

For selecting appropriate data by means of rows and columns application provides the form Selecting of rows and columns for the export.... This form allows user to select rows and columns intended to be exported.

3. Setting output file name.

Application provides standard "Save as ..." form for setting output Microsoft Excel file name. After proper file name setting export process of selected data will continue.


Data export to Microsoft Excel table


Data export to a Paradox table consists of the following steps:

1. Selection of appropriate function from the application menu.

Functions for data export are located in submenu View --> Export of the main application menu. Item Paradox table that invokes desired function is placed in next submenu. See also Main menu.

2. Selecting of rows and columns.

For selecting appropriate data by means of rows and columns application provides the form Selecting of rows and columns for the export.... This form allows user to select rows and columns intended to be exported.

3. Setting output file name.

Application provides standard "Save as ..." form for setting output Paradox file name. After proper file name setting export process of selected data will continue.


Data export to PARADOX table


Data export to a text file consists of the following steps:

1. Selection of appropriate function from the application menu.

Functions for data export are located in submenu View --> Export of the main application menu. Item Text file that invokes desired function is placed in next submenu. See also Main menu.

2. Setting up parameters.

For setting up parameters application provides the Setting export parameters... form. This form allows user to adjust appropriately the text file content.

3. Setting output file name.

Application provides standard "Save as ..." form for setting output text file name. After proper file name setting export process of selected data will continue.


Means for setting up parameters of a data export into the text file are provided within the following form:

Form contains three panels. Each panel has its specific function. User can change active panel by clicking the left mouse button on the tab with required panel name.

1. Preview.

This panel shows a preview, how the output text file will look like with actual parameters' values setting. See Preview.

2. Separator settings.

This panel contains a set of visual controls that provide choices of columns seperators to be used. See Separator settings.

3. Special settings.

This panel contains a set of visual controls for setting up other special parameters affecting the resulted text file content, like columne index, export of selected data only and commentary. See Special settings.

Form contains also two buttons:

By clicking on this button user accepts actual parameter values and process of data export to a text file will continue.

When user clicks on this button the process of data export to a text file will be canceled.


The following panel provides quick preview of the text file how it would look like for actual parameters’ setting (the text file is not created yet).

This panel is provided to the user when tab Preview is selected. It contains two buttons and the preview area.

1. Button Back.

By clicking on this button user can change the actual starting position of the previewed part of the text file. It will be shifted 15 lines backward (i.e. in direction to the beginning of the text file). If first 15 lines of the text file are previewed, this button is disabled.

2. Button Forward.

By clicking on this button user can change the actual starting position of the previewed part of the text file. It will be shifted 15 lines forward (i.e. in direction to the end of the text file). If last 15 lines of the text file are previewed, this button is disabled.

3. Preview area.

Within this area 15 consecutive lines of the text file can be displayed at once. User can change the actual starting position of the previewed part of the text file using two buttons described above.


This panel contains set of control components for setting column separators.

This dialog box is provided when user selects the Preview tab. It contains four panels for setting column separators, panel for setting value that will represent empty item values in exported text file and panel for setting delimiter of string item values.

Separator setting.

User can activate specific separator by clicking on the Apply... button. Other components are disabled.

1. Panel Fixed length.

If user selects this separator, columns will have fixed length. User can directly type required length value or increase/decrease already presented value using control buttons.

2. Panel Tabulator.

If user selects this separator, column separation will be realized by means of tabulator. The number of tabulators which will be putted into the text file after each data item can user type directly or increase/decrease already presented value using control buttons.

3. Panel Space.

If user selects this separator, column separation will have fixed length. Length is the value, which specifies number of spaces that will be putted into the text file after each data item. User can directly type this value or increase or decrease already presented value using control buttons.

4. Panel Arbitrary symbol.

If user selects this separator, column separation will be realized by means of specified character. User must specify this character, number of its occurrences, and number of spaces before and after given characters. These values are given within the next text fields. User can directly type these values or increase or decrease already presented values using control buttons.

Empty value tag

User can type here a string, which will be used for replacement of empty item values in the exported text file.

String delimiter

User can specify here a character – delimiter, which will delimit all string values in the exported text file. It applies only to string typed items.


This panel contains controls for setting up some special parameters.

This panel will be displayed when user selects the Special tab. It contains the following three panels:

Column index.

If user selects this parameter, (after clicking on the Apply... button) new column with specific meaning will be added at the beginning of the active view table. Values in this column will index (in ascending order) all rows in the active view table. User must set starting index value in the appropriate text field. User can directly type this value or increase/decrease already presented value using control buttons.

Data selection.

User can choose which rows and columns will be exported. If this box is checked, only selected rows or columns will be used for exporting. If active view table does not contain any selected rows or columns then appropriate check boxes are disabled.

Commentary.

If user selects this parameter, (after clicking on the Apply... button) additional line(s) with user defined text information (commentary) will be added to the exported text file. Size of this line is unlimited. Moreover, user can insert a counter into commentary text. Number of such counters is also unlimited. User can also set the repeating period. If user sets repeating period to zero, only one line with given commentary will be added. Finally, user can decide whether commentary lines will start from the very beginning or not.


User can define a counter, i.e. a variable value of which is increased in each consecutive row. Each counter is delimited by a pair of '%' characters.

Counter definition:

%Value1:Value2%

Value1 - Counter starting value.
Value2 - Increment.

If the syntax is not kept, the '%' characters will be ignore.

Examples:

"Row number %1:1%" – results in the following string in the exported text file: "Row number 1" in the first occurrence, "Row number 2" in the next one, etc.

"Row number %5:5%" - results in the following string in the exported text file: "Row number 5" in the first occurrence, "Row number 10" in the next one, etc.

"This is letter %%" - results in the following string in the exported text file: "This is letter %" in each occurrence.

"This is a error %1:1" - results in the following string in the exported text file: "This is a error 1:1" in each occurrence - character '%' has been ignored.


Data export to text file - Overview


Data export to text file - Setting parameters


Data export to text file - Preview


Export data to text file - Separator settings


Data export to text file - Special settings


Data export to text file - Counter addition


Data import from DBASE table consists of the following three steps:

1. Selection of appropriate function from the application menu.

Functions for data export are located in submenu View --> Import of the main application menu. Item DBASE table that invokes desired function is placed in next submenu. See also Main menu.

2. DBASE table selection.

Application provides the standard dialog form for file selection:

User needs to select directory and file name of the required DBASE table. By checking the Read only checkbox, created new view will be read only (can not be edited).

After proper file name selection import process from given DBASE table will be realized. About work progress the user is informed in the panel Operations.


Data import from DBASE table


Data import from the Microsoft Excel program consists of the following steps:

1. Selection of appropriate function from the application menu.

Functions for data export are located in submenu View --> Import of the main application menu. Item Excel program that invokes desired function is placed in next submenu. See also Main menu.

2. Getting data ranges from Excel using built-in wizard.

This procedure is guided using Importing data from Excel... form. As a result of this procedure, user defined data ranges in Microsoft Excel program are pulled.

After these two steps import process from Microsoft Excel program will be realized. About work progress the user is informed in the panel Operations.


For getting data ranges in Microsoft Excel program KDD package uses this wizard.

Run Excel program.

If wizard does not determine running Microsoft Excel program, this message with a button will be shown. By clicking on the button user starts Microsoft Excel program. Otherwise this step will be skipped.

Choosing data areas.

Now the wizard displays panels with information about currently selected areas in Microsoft Excel program. On the left hand side the panel with displayed list of currently opened workbooks and worksheets is presented. User must select one of these worksheets from which the data will be imported. To use currently active worksheet, user may just check the Use active checkbox. There are two possibilities how to select required areas. User can define new areas or just use areas already selected in Microsoft Excel program.

1. In order to define new areas user needs to click on Add button and select starting and ending location for required selection. User can delete one or all areas using button Delete or Clear.

2. If user wants to use areas already (manually) selected in Microsoft Excel program, clicking on the Reload button is needed in order to update information displayed by the wizard.

Multiple data areas.

If user selects more areas, the wizard displays a message and asks the user to specify way how to join given areas into one final table. User has now two possibilities how to join them.

· Join from bottom (areas are joined one under another)

· Join from right (areas are joined one next to another)

By clicking on the Finish button wizard finish his work and the import process will continue.


Data import from Microsoft Excel - Overview


Data import from Microsoft Excel - Getting data ranges


Data import from Paradox table consists of the following three steps:

1. Selection of appropriate function from the application menu.

Functions for data export are located in submenu View --> Import of the main application menu. Item Paradox table that invokes desired function is placed in next submenu. See also Main menu

2. Paradox table selection.

Application provides the standard dialog form for file selection:

User needs to select directory and file name of the required Paradox table. By checking the Read only checkbox, newly created view will be read only (can not be edited).

After proper file name selection import process from given Paradox table will be realized. About work progress the user is informed in the panel Operations


Data import from Paradox table


KDD Package provides access to remote databases on SQL servers. Data can be gained using SQL command. Built-in wizard generates SQL command automatically. This procedure has three steps:

1. Selection of appropriate function from the application menu.

Built-in wizard generating SQL command can be called using Create from SQL command in the View submenu of the main application menu. See also Main menu.

2. Creation of SQL command using built-in wizard.

SQL wizard controls the whole process of the SQL command generation.

3. Running generated SQL command and getting resulted data.

SQL command will be run on appropriate SQL server. Result of this command is data stored within the newly created view. About work progress the user is informed in the panel Operations.


SQL wizard creates SQL command by interaction with the user. The wizard provides a dialog window that consists of two main areas and three main buttons:

List of aliases

This area, placed on the left hand side, contains a list of all available aliases in the BDE database environment. By clicking on particular alias name it will be expanded and user can see all tables that are available within this alias. Likewise, by clicking on particular table name it will be expanded and user can see all columns of that table. By clicking on the Reload button, which is placed on the bottom will refresh actual list of aliases.

Set of panels.

This area, placed on the right hand side, contains four panels that represent three main parts of each SQL command and the resulted generated SQL command (in textual form) itself. There are the following panels:

Part "Select"

This panel contains the list of columns that user wants to gain from one or more tables. For details see Part "Select".

Part "From"

This panel contains the list of tables that will be used. For details see Part "From".

Part "Where"

This panel contains conditions of the generated SQL command. For details see Part "Where".

SQL command

This panel is used for displaying the generated SQL command in textual form. This panel contains conditions of the generated SQL command. It is read only.

At last there are three main buttons there:

- button confirms actual state of the wizard and procedure running generated SQL command will continue.

- button closes the wizard and cancels SQL command generation procedure.

- button clears all components of the wizard and actual state of the wizard will be equal to the starting state.


This panel contains the list of all columns that user wants to get from one or more tables into the new view. Information related to a column is divided into six attributes. Panel also contains four buttons. It looks like here:

If the checkbox in the header of this panel is checked, then columns from the list are used in the part "Select". Otherwise all columns from the table placed in the next panel part "From" are used. User adds new column using drag and drop functionality for selected column name from the left - aliases panel to this panel. Information to each item in the list is divided into six attributes:

- attribute contains checkbox and column alias icon. If user checks the checkbox related to a prticular column, this column will be added to the actual sort list. Position of this column in sort list is signalized by the attribute Order of sorting and type of sorting by attribute sort type.

- attribute contains name of the source table.

- attribute contains name of the column.

- attribute contains name of the source alias.

- attribute contains position of particular column in the sort list. If column is not a member of the sort list, this value is empty.

- attribute contains type of sorting that is used for particular column. Possible values are: ASC - ascending sorting type and DESC - descending sorting type. By clicking on the [image] (in the header of this attribute) user may invert selected sorting type.

There are four buttons used to control column list:

- button clears actual list of columns.

- button removes selected column from the actual list of columns.

- This pair of buttons is dedicated to moving position of the selected column up and down in the list.


This panel contains the list of tables that will be used for selection in generated SQL command. If the checkbox in the header of the panel Part "Select" is checked, this list is generated automatically. Otherwise user can insert new item using drag and drop functionality for selected table name from the left - aliases panel to this panel. For example:


This panel contains conditions of the generated SQL command. Checkbox in the header of this panel signalizes whether conditions will be used in generated SQL command or not. This panel consists of two subpanels, one text box and nine buttons:

Information textbox:

Text box displays the actual condition. This is read only information. In order to change content of the actual condition, user needs to use controls placed on the right hand panel.

The left hand side subpanel displays currently defined conditions in the tree format. Logical connectives between conditions are depict by [image] and [image] icons. The user can define and edit this tree using buttons in the bottom left part of the window, namely:

Add - Add a new condition to the current level.

Clear - Clear all conditions.

Expand - Create a new level in the tree of conditions.

Delete - Delete selected condition.

Change - Change logical connective for selected condition (two posibilities are provided: AND, OR).

The right hand side subpanel is used for creation or modification of selected condition. It contains the following controls:

List of elements of the selected condition - It displays the list of elements for currently selected condition.

Text field - In this text field entire condition is displayed (read only field).

Add - For adding of a new element into the selected condition. User can choose (by clicking on this button) from several predefined elements, columns from selected tables expanded in panel Part "Select" or provide a specific string.

Clear - Clears all elements.

Insert - Inserts a new element into the actual condition. User can choose (by clicking on this button) from several predefined elements, columns from selected tables expanded in panel Part "Select" or provide a specific string.

Delete - Deletes selected element.


Create view using SQL language - Overview


SQL wizard


SQL wizard - SQL command - part "Select"


SQL wizard - SQL command - part "From"


SQL wizard - SQL command - part "Where"


Data import from a text file consists of the following steps:

1. Selection of appropriate function from the application menu.

Functions for data export are located in submenu View --> Import of the main application menu. Item Text file that invokes
desired function is placed in next submenu. See also Main menu.

2. Input text file selection.

Application provides the standard dialog form for file selection. User needs to select directory and required text file name.

3. Setting up parameters.

Setting up parameters for input text file transformation may be done using Setting import parameters... form.

After proper file name selection and parameters setting import process from given text file will be realized. About work progress the user is informed in the panel Operations.


Setting parameters for data import from text file can be done using the following form:

This form consists of two panels. Each panel has its specific function. User can change active panel by mouse clicking on the tab with required panel name.

1. Preview.

This panel shows how the future table will look like with actual parameter values. See Preview.

2. Separator settings.

This panel contains a set of visual controls that provide choices for column seperators used when importing data from a text file. See Separator settings.

By clicking on this button user accepts actual parameter values and as a result data import from specified text file will start.

By clicking on this button user cancels the process of data import from a text file.


This panel provides quick simulated preview of content of the table to be created (with actual parameters' setting) without necessity to run the real process of data import from the specified text file.

Panel is shown when user clicks on the Preview tab. Panel contains one table that represents new table and two areas for displaying the number of rows and the number of columns of the new table.


This panel contains set of control components for setting column separators.

This dialog box is provided when user selects the Separators tab. It contains three panels. One panel is used for setting column separators, the other one for setting value that will represent empty item values in imported view and the last one for setting delimiter of string item values.

Separator type.

User can activate specific separator by checking particular checkbox for selected separator type. Other possibilities are disabled in that moment.

Fixed length.

If user selects this separator, columns are expected to have fixed length. User can directly type required length value or increase/decrease already presented value using control buttons.

Tabulator.

If user chooses this separator type, column separation is expected by means of tabulator.

Spaces.

If user chooses this separator type, column separation is expected by means of space character.

User character.

If user choose this separator type, column separation is expected by means of a specific character. User should specify this character in the next textbox.

Empty value.

User can type string that represents empty values in the specified text file.

String delimiter.

User can type a character - delimiter, which is expected to delimit all string typed values in the imported text file.


Data import from text file - Overview


Data import from text file - Setting parameters


Data import from text file - Preview


Import data from text file - Separator settings


Information panel shows hints related to controls, menu items and buttons.


Information bar


 Main menu is placed on top of the main application window. It provides access to all functions, that KDD Package and external modules provide. In the basic configuration main menu consists of these six submenus:

View - Functions for creating, deleting, saving and loading view and its data. There are the following:

Create from SQL command... - Function for creating a new view using SQL command, which is generated automatically using built-in wizard.
Load - Function for loading a saved view.
Rename - Function for renaming the active view.
Save - Function for saving the active view to a file.
Delete - Submenu contains two items with following meaning:
Actual - Function for deleting the active view.
All - Function for deleting all views.
Import - Submenu contains four items with following meaning:
DBASE table - Function for creating of a new view using import function from a DBASE table.
Paradox table - Function for creating of a new view using import function from a Paradox table.
Text file - Function for creating of a new view using import function from a text file.
Program Excel - Function for creating of a new view using data obtained from Microsoft Excel program.
Export - Submenu contains five items with following meaning:
DBASE table - Function for exporting data from the active view to a DBASE table.
Paradox table - Function for exporting data from the active view to a Paradox table.
Text file - Function for exporting data from the active view to a text file.
Excel table - Function for exporting data from the active view to the Microsoft Excel program.
Excel program - Function for exporting data from the active view to a Microsoft Excel table.

Row - Functions that operate with rows of the active view table :

Select type - Submenu contains four items:
Type 1 - Function sets selection type to type 1.
Type 2 - Function sets selection type to type 2.
Type 3 - Function sets selection type to type 3.
Type 4 - Function sets selection type to type 4.
Selection - Submenu contains nine items:
Select actual row - Function assignes actual row with the active selection type.
Deselect actual row - Function removes assignment of the actual row.
Select all - Function assignes all rows with the active selection type.
Select all unselected - Function assignes all not currently assigned rows with the active selection type.
Deselect all - Function removes assignment of all rows.
Deselect all of actual type - Function removes assignment of all rows that are assigned with active selection type.
Invert selection - Function inverts assignment of all rows in the table with respect to the selection type. Rows assigned with actual selection type become unassigned and opposite (rows assigned with other selection types remain unaffected).
Invert selection without reference to type - Function inverts assignment of all rows in the table without respect to the selection type. Rows assigned with actual selection type become unassigned and all other rows become assigned with actual selection type.
Special - Special selection or sampling procedures:
Select multiple rows - Function can select multiple block of rows (useful when processing data from data warehouses).
Copy to... - Function copies selected rows to the clipboard.
Move to... - Function moves selected rows to the clipboard.
Add from... - Function adds new rows from clipboard at the end of the view table.
Add - Function adds new row with empty values at the end of the view table.
Insert - Function inserts new row with empty values at the actual row position.
Delete - Functions for deleting rows:
Actual - Function for deleting of the actual row.
Selected - Function for deleting of all rows that are selected with the active selection type.

Column - Functions that operate with columns and single items of the active view table:

Select type - Submenu contains four items:
Type 1 - Function sets selection type to type 1.
Type 2 - Function sets selection type to type 2.
Type 3 - Function sets selection type to type 3.
Type 4 - Function sets selection type to type 4.
Selection - Submenu contains eight items:
Select actual column - Function assignes actual column with the active selection type.
Deselect actual column - Function removes assignment of the actual column.
Select all - Function assignes all columns with the active selection type.
Select all unselected - Function assignes all not currently assigned columns with the active selection type.
Deselect all - Function removes assignment of all columns.
Deselect all of actual type - Function removes assignment of all columns that are assigned with active selection type.
Invert selection - Function inverts assignment of all columns in the table with respect to the selection type. Columns assigned with actual selection type become unassigned and opposite (columns assigned with other selection types remain unaffected).
Invert selection without reference to type - Function inverts assignment of all columns in the table without respect to the selection type. Columns assigned with actual selection type become unassigned and all other columns become assigned with actual selection type.
Copy to... - Function copies selected columns to the clipboard.
Move to... - Function moves selected columns to the clipboard.
Add from... - Function adds new columns from clipboard at the end of the view table.
Insert - Function inserts new column with empty values to the actual column position.
Delete - Functions for deleting columns:
Actual - Function for deleting of the actual column.
Selected - Function for deleting of all columns that are selected with active selection type.
Item - Submenu contains two items:
Edit - Function enables editing of the value of the actual item.
Replace - Function replaces item values in the actual column by another value.
Rename - Function renames the actual column.
Split - Function splits actual column based on given rules (useful when processing data from data warehouses).

Algorithms - Currently in the KDD package presented data mining algorithms:

C45 - Run C4.5 (algorithm for mining decission trees)
CN2 - Run CN2 (algorithm for mining decission rules)

Operation - Here are the functions for operations queue control:

Undo - Function reverses the last operation in the operations queue.
Undo all - Function reverses all operations in the operations queue.
Redo - Function redoes the previously undone operation.
Redo all - Function redoes all previously undone operations in the operations queue.
Delete - Function reverses and deletes from operations queue the last operation.
Delete all - Function reverses and deletes from operations queue all operations.
Reload - Function reloads all operations into the operations queue.

Package - Configuration and help.

Configuration - Configuration of this application.
BDE Administrator - Function runs a BDE configuration program.
Help - Function invokes this help.
About - Function shows information about the program origin and about its authors.


Data from given domain is assumed to be in form of examples that are converted into tables. Example represents one row of the processed table. Columns of table represent attributes. Algorithm C4.5 is able to process attributes of the following types.

Discrete - finite set of possible attribute values (e.g. a set {ground, fire, water, air})

Continuous - infinite set of values (e.g. real numbers)

All other types of attributes must be converted into one of supported types. Attributes of examples are divided on data part, which describe given example and decision part. Decision part is represented in algorithm C4.5 by one attribute, value of which represents one of possible classification classes.


Examples and attributes


Decision tree is representation of a decision model for classification of examples into classes. Each node represents class (leaf node) or decision test (non-leaf nodes). Decision tree represents the following decision procedure: it starts classification of an example in the root node, follows the results of tests (in dependence on values of attributes of given example) by particular branches and through non-leaf nodes finally ends classification in one of the leaf nodes. Leaf node assigns example with one value of classification attribute.


Decision tree


Module C4.5 creates files with extensions "tre", "unp", "txr", "txs" a "trr".

In files with extensions "tre" and "unp" is saved pruned and unpruned tree in binary form.

Textual form of the generated tree is saved in file "txr". In this file is saved generation procedure and classification errors on testing data set.

Information about testing with errors and contingence table is saved in file with extension "txs".

Contingence table and information about attributes is saved in file "trr" in binary form.


Files generated by C4.5 module


Leaf node indicates class for examples which are covered by this node.


Leaf node


User can select attributes that will be taken into the data part for decision process through left mouse button click. For each existing attribute its name and type is displayed.

Right mouse button click will provide the possibility to select the decision part, i.e. attribute, which represents the classification class. This attribute is displayed on the right hand side. Only discrete typed attribute may be selected as class attribute!


Selection of attributes


User can select actual view and within this view particular rows for testing phase. Number of examples is displayed on Attributes tab.


Selection of testing examples


User can select actual view and within this view particular rows for training phase. Number of examples is displayed on Attributes tab.

User can select decision tree for testing process from previous C4.5 operation or load an existing tree from a saved file.

In the bottom of the left hand side name of actual operation is displayed. In the screenshot above, name of the operation is Tree2.


Selection of training examples


Grouping discrete attribute values - If this checkbox is checked, grouping values of discrete attributes into sets (which may be used than for compound tests within one node of decision tree) will be enabled. Otherwise only nodes with one testing attribute of will be generated.

Gain ratio criterion - Criterion for selection of attribute for decision test. User can select "Ratio gain criterion" by checking appropriate checkbox. Otherwise the "Gain criterion" (original criterion from ID3) will be used.

Pruning - Pruning of generated decision tree. The higher number will be selected, the stronger will be the pruning effect (the smaller and maybe less precise will be the final decision tree).

Minimum samples in leaf - Minimal count of examples in leaf node (the smaller number will be selected, the more detailed and precise tree will be generated).

Level of listing - Level of listing of generated tree (how many levels of the resulted decision tree are allowed).

Windowing - If this checkbox is checked, windowing will be used during process of generation of decision tree (more decision trees will be generated based on various training sets of examples).

Number of trees - - Number of generated trees for windowing method.

Size initial window - Initial size of the window (initial training set) for windowing method (in each iteration new – badly classified examples will be added to actual training set).

Max. number added samples - Maximal number of examples added in one step to the actual training set for windowing method

Use default button for default settings.


Parameters settings


Double click on particular item in the list will load previously performed operation with selected name. Each generation and testing process has its unique name, which is displayed on Data tab of the C4.5 module or on Operation tab of the KDD package application window.


List of last operations


Evaluation on test data (972 items):

     Before Pruning            After Pruning
    -------------- ----------------------------------
    Size    Errors   Size      Errors    Estimate

      23   6( 0.6%)   23   6( 0.6%) ( 0.8%) <<

Results for testing on data set with 972 examples.

23 - unpruned decision tree has 23 nodes

6(0.6%) - classification error on unpruned tree (displayed as number of examples which are incorrectly classified or as % from total number of examples.)

23 - pruned decision tree has 23 nodes

6(0.6%) - classification error on pruned tree (displayed as number of examples which are incorrectly classified or as % from total number of examples.)

0.8% - estimated classification error on unpruned tree on testing data set.

       (a)   (b)   (c)   (d)	<-classified as
     ---- ---- ---- ----
       39          1      	(a): class compensated hypothyroid
        2  898    1      	(b): class negative
              2   29      	(c): class primary hypothyroid
                            (d): class secondary hypothyroid

In rows of the confidence table are examples which belongs to class introduced in training example.

In columns of the confidence table are examples which belongs to class following classification with decision tree.

On diagonal are examples classified correctly with decision tree. Outside of the diagonal are examples which are classified incorrectly. (only if in training data set is class assigned correctly for all examples)


Textual form of the confidence table


Read 150 cases (4 attributes)

Decision tree was generated from 150 examples. Each example has 4 attributes plus class attribute.

Decision Tree:

Petal length <= 1.9: Iris-setosa (50.0)
Petal length > 1.9:
|  Petal width > 1.7: Iris-virginica (46.0/1.0)
|  Petal width <= 1.7:
|  |  Petal length > 5.3: Iris-virginica (2.0)
|  |  Petal length <= 5.3:
|  |  |  Petal length <= 4.9: Iris-versicolor (48.0/1.0)
|  |  |  Petal length > 4.9:
|  |  |  |  Petal width <= 1.5: Iris-virginica (2.0)
|  |  |  |  Petal width > 1.5: Iris-versicolor (2.0)

In the root node attribute Petal length is used for decision condition. From this node examples goes through branch Petal length <= 1.9 to the leaf node Iris-setosa, which covers 50 examples.

etc.

If leaf node looks like this:

Iris-virginica (46.0/1.0)

46.0 - sum of the weights of training examples in this node. (sum has decimal part if training set has examples with unknown values),

1.0 - sum of the weights of training examples which are not from predicted class. (incorrectly classified examples)

Evaluation on training data (150 items):

     Before Pruning            After Pruning
    -------------- ----------------------------------
    Size    Errors   Size      Errors    Estimate

      11   2( 1.3%)   11   2( 1.3%) ( 6.4%) <<

Results for testing on data set with 150 examples.

11 - unpruned decision tree has 11 nodes (6 leaf nodes, 5 decision nodes and one root node)

2(1.3%) - classification error on unpruned tree (displayed as number of examples which are incorrectly classified or as % from total number of examples.)

11 - pruned decision tree has 11 nodes

2(1.3%) - classification error on pruned tree (displayed as number of examples which are incorrectly classified or as % from total number of examples.)

6.4% - estimated classification error on unpruned tree on testing data set.


Textual form of the generated tree


Example, which has unknown value for class attribute is filtered out. If count of the examples with unknown class is higher than given limit, generation process is terminated.

Algorithm is able to process examples which have unknown values for some decision attributes (other than class attribute) in training dataset. At first, algorithm processes examples without unknown values. Examples with unknown values are processed hereafter. If number of unknown value for one attribute is higher than given limit, attribute is omitted from next processing.

When is generated tree used as classifier, processing of the examples don't have limit for count of the unknown value examples.


Unknown values


In rows of the confidence table are examples which belongs to class introduced in training example.

In columns of the confidence table are examples which belongs to class following classification with decision tree.

On diagonal are examples classified correctly with decision tree. Outside of the diagonal are examples which are classified incorrectly. (only if in training data set is class assigned correctly for all examples)

You can click outside of the diagonal to display list of the examples numbers which are incorrectly classified.


Visual form of the confidence table


Wideness of the line is proportional to the part of examples from parent node, which is covered by particular sub-node. Size of the node is proportional to the number of examples covered by that node.

Nodes are represented in form of pie diagrams, where size of particular sectors is proportional to examples distribution to class in that node. Each class has its unique colour.

In order to expand or collapse a sub-tree user can click left mouse button on particular root node of the sub-tree in question.

Node with collapsed sub-tree is bounded with white cycle. Node has red coloured bounds, when it cannot be expanded.

When moving cursor over nodes, the following information is presented in the header of this window.

Type of the node and number of examples covered by that node

Name of the attribute, which is used for decision test, or class for leaf node

Branches for decision node with decision conditions and number of examples covered by these branches.

In the right bottom part of the window legend with colours assigned to particular classes is displayed.

In the right upper part of the window the number of node layers and number of nodes in sub-tree (actual node is root node of this sub-tree) are displayed.

User can select required number of actually displayed layers and size of displayed decision tree.

Click on button [image] will confirm and provide actual changes in settings


Visual form of the generated tree


Implemented CBR algorithm for prediction provides a visual guide, which leads the user step by step through the whole prediction process, from attributes selection, their normalization up to the final results evaluation.

Algorithm is can be activated in the Algorithms submenu of main CBR menu. Visual guide successively shows six dialog windows corresponding to six main steps of the CBR prediction algorithm:

1.Configuration of the training set (Training set – configuration).

2.Transformation of attributes (Attribute transformations).

3.Attributes selection (Columns selection).

4.Configuration of the test set (Testing set – configuration).

5.Configuration of the CBR algorithm itself (Algorithm – configuration)

6.Displaying of results (Results)

There is possible to move within the prediction process by means of two buttons that are located in the lower part of the window. Clicking on Next button will guide the user one step forward in the prediction process and clicking on Back button will return one step back. By clicking on the Cancel button the prediction process may be cancelled any time.


This dialog window is separated into six panels with the following control elements:

1. Panel „View“ – user can specify view, which will be used as source of data for the training phase (training set).

2. Panel „Settings“ – user can specify, whether there will be allowed processing of empty and nominal values.

3. Panel „Chosen attributes“ – user can specify, which attributes will be arranged in anticipatory fetching of attributes.

4. Panel „User attribute selection“ – list of currently selected attributes for the training set.

5. Panel „Predicted attribute“ – user can specify, which attribute will be final (predicted) attribute.

6. Panel „Training set“ – user can specify, which lines will be selected for the training set.


This dialog window is divided into three panels with the following control elements:

1. Panel „Use normalization“ – user can check this if the attributes normalization should be used. Specify type of normalization, way when it has to be applied and whether normalization should be applied also for nominal attributes.

2. Panel „Correlation coefficients“ – by checking this button user can require the calculation of correlation coefficients between particular attributes and predicted attribute. Moreover, user can require calculation of the whole correlation matrix (correlations between each pair of attributes will be calculated).

3. Panel „Nominal attributes“ – user can specify here the way of processing of nominal attributes (when this feature is allowed). When processing of nominal attributes is not allowed, this panel will be hidden.


This dialog window is divided into the following two panels:

1. Upper panel – panel is displaying the list of default-selected attributes in training set. List is separated into four columns:

1. Column „Name“ – name of the column (attribute). Checking box before particular attribute name represents its (un) selection for the final training set.

2. Column „Correlation coefficients“ – numerical value – calculated correlation between particular attribute and predicted one. This list is sorted downward by means of this value.

3. Column „Normalization method“ – used method of normalization.

4. Column „Normalization parameters“ - parameters for used normalization.

2. Bottom panel – includes a list of currently checked attributes within the upper list. The second column here presents correlation coefficients between the attribute currently highlighted in the upper list and all other attributes currently selected for the training set.


This dialog window is divided into three areas with the following functions:

1. Attribute mapping – user has to specify which attribute from the test set corresponds to which attribute from the training set. Button Auto initiates automatic mapping, which uses names of attributes and their types to assign attributes from training set to attributes from test set. Button Delete cancels all existing assignments of attributes. User can click on the right mouse button in order to select name of attribute for mapping of the currently highlighted attribute.

2. Panel „View“ – user can specify from which view data for the test set will be used.

3. Panel „Training set“ – user can specify, which lines of selected view will be incorporated into the test set.


This dialog window is divided into five panels with the following control elements:

1. Panel „Number of neighbours“ – user can specify the number of nearest neighbours which will be taken into account for calculation of predicted value.

2. Panel „Method of computation of predicted value“ – user can select version of the CBR approach to be used for prediction.

3. Panel „Neighbour weights“ – user can set values of neighbours’ weights (how much particular neighbour will influence the calculated prediction in comparison to other neighbours).

4. Panel „Attributes“ – user can set values of weight of attributes for calculation of distance and for correction.

5. Panel „Work mode“ – user can specify mode of prediction algorithm:

1. Button „Learn mode“ – algorithm uses test set for finding optimal values of neighbour weights. For this mode evolution algorithm (EA) is used. EA settings can be specified in dialog window accessible by clicking on EA config button.

2. Button „Predict mode“ – algorithm uses test set for prediction using actual values of neighbour weights.

Using button Load predictor parameter there is possible to load new configuration values of prediction algorithm from an existing file.


This dialog window is divided into three areas with the following functions:

1. Panel „Errors“ – displays counted values of given types of prediction errors.

2. Saving buttons – user can save actual settings of prediction algorithm into a file using Save predictor parameters button. Save results button can be used to save obtained predicted results into a view of the KDD Package application.

3. Panel „Result table“ – this panel displays obtained predicted results. This table has three columns:

1. Column „Original values“ – original values of predicated column in test set.

2. Column „Predicted values“ – calculated predicated values.

3. Column „Prediction errors“ – relative error of calculated prediction.


In case-based reasoning (CBR) approach [1] a new problem is solved by finding a similar past case, and reusing it in the new problem situation. In case of prediction we use k nearest past cases to predict the target attribute of a new case. In order to find the k nearest cases, we use the following distance measure between two cases A and B:

(1)

where A is a past case, B a new case, [image] is weight of attribute A, [image] is the value of i-th attribute of the past case A, [image] is the value of i-th attribute of the new case B and n is the number attributes (without the target attribute to be predicted). The attributes are normalized before calculating distances. If any of the attribute values is unknown, value of the distance is set to 1. For nominal attributes if both attribute values are similar, their distance is 0, otherwise the distance is set to 1.

Value of the target attribute of a new case B is calculated as a weighted sum of corrected values of target attribute of all k nearest past cases.

(2)

where [image] is the weight of the i-th closest neighbor case, [image] is its value of target attribute, [image] is correction used for the i-th closest neighbor case and k is the number of neighbor cases taken into account for prediction. Correction used for the i-th closest neighbor case is calculated as follows.

(3)

where [image] is weight of the i-th attribute after correction.

For set of all training cases minimal, maximal and average error is calculated. Quality of prediction is given by used weights ( [image] [image] [image]) and number of past neighbor cases (k) taken into account for prediction. User may set up all these parameters. Weights are further optimized in order to achieve minimal prediction error by means of evolutionary algorithm.

Each individual in population is represented as a one-dimensional vector of real values of all weights [image] [image] [image] for i = 1, …, n. There is possible to choose between mean deviation and mean squared error for fitness function that defines quality of each individual.

The user gives population size and may also specify initial weights, which will be used for the first (best) individual in initial generation. Termination condition can be specified by means of maximal error (minimal fitness) of the best individual, by means of the number of generations, or both.

Each new generation is calculated using two genetic operators – mutation and crossover. There are two types of mutation, one that should produce individuals significantly different from the parents (random change of weights from predefined intervals) and the other one mainly aimed for fine changes in individuals (random change of weights in a very small interval). Crossover means that less then half of the weights are changed between two parent individuals. Particular genetic operators are applied to each parent individual with specific probabilities, which may be set up by the user.

New generation is selected from all individuals produced within a generation (all parent as well as all individuals newly generate using genetic operators) as follows. All individuals are sorted by their fitness and 80% of the best plus 20% of the worst is taken into the new generation of individuals.

[1] Kolonder, J.: Case-Based Reasoning. Morgan Kaufmann Publishers (1993)


Algorithm CBR


Algorithm CBR - Training set configuration


Algorithm CBR - Attribute transformations


Algorithm CBR - Columns selection


Algorithm CBR - Testing set configuration


Algorithm CBR - Algorithm configuration


Algorithm CBR - Results


Algorithm CBR - Theory


Rule induction algorithms (like CN2) employ ”separate and conquer” search strategy. In this strategy algorithm forms a class definition by constructing a rule that covers many positive examples, and few negatives, then separating out covered examples and starting again on the remainder. This splintering of the training set may cause later rules, and later conditions within each rule, to be induced with insufficient statistical support (sample of training examples), leading to greater noise sensitivity and missing or incorrect rules or conditions. This problem is denoted as a fragmentation problem. Another problem of rule induction algorithms is small disjuncts problem: rules covering few training examples tend to be highly error prone, but removing them, decreasing the global accuracy. Some of these small disjuncts corresponds to rare cases, and are intrinsically difficult to learn, because only a small sample of then is available, however other small disjuncts may be a product of the fragmentation problem.

Rule induction algorithms have several advantages. Most notable one is that rules are most easily understood by humans. Other advantages of rule induction algorithms include: their ability to select relevant attributes in high-dimensional instance spaces and their natural suitability for symbolic domains, and ability to easily mix symbolic and numeric attributes. Because only statistical measures are used to evaluate induction, good noise immunity can by achieved.

The RISE algorithm reduces some of the introduced problems of the rules induction algorithms. This algorithm unifies rule induction and instance-based learning. Instance-based learners are able to form complex decision boundary in the instance space. Special cases that may be missed by abstraction forming algorithm can be retained and recognized. IBL have some disadvantages, however. The memory cost of the class descriptions they produce is typically greater, and they can be harder for a human to understand. Most significant problem for IBL is arguably that posed by irrelevant attributes. The contribution of these attributes to the global distance constitutes the noise and they can swamp out the relevant component. Another problem is that some attributes may be relevant only in context (i.e. given the values of other attributes). However, RISE algorithm is able to selectively generalize and drop attributes from instances, and thus to reduce the context-dependency problems that can affect instance based learners. RISE employs a specific-to-general; ”conquering without separating” search strategy. This allows it to reduce the fragmentation and small disjuncts problems.

When the target description is a mix of general rules and more specific ”exceptions” areas, both approaches can have problems to find appropriate description. General-to-specific learners may not recognize the exception areas, and specific-to-general ones may induce only imperfect, corrupted general rules. A natural solutions would be to combine the two search directions in a single system. The CN2-RISE module for KDD Package environment is one realization of this idea.


Decision rules mining


Within this tab user can set up parameters of the CN2 algorithm.

Generated rules – Algorithm CN2 generates ordered list of rules (if then else rules) or unordered list of rules (if then rules). Appropriate checkbox must be checked.

Star Size – Number of best complexes, which are expanded in next iteration of CN2 algorithm.

Significance – Minimal number of occurrences (for example if we want to generate only rules with minimal occurrence 5%, significance threshold is 0,05)

Test Nominal NotEqual – Testing rules with possible condition in the form of "nominal attribute <> value" will be searched for as well.

Windowing – If this checkbox is checked, windowing will be used during the process of generation of decision rules (more sets of decision rules will be generated based on various subsets of training set).

On the Rules panel the list of generated rules and information about rules is displayed. In this panel actual rule can be selected by positioning the cursor on the requested rule. Information about actual rule is displayed in distribution panel and rule information panel:

Distribution - Number of examples for each class covered (i.e. examples that satisfy the conditional part of the rule) by actual rule.

Occurrence - Total number of examples covered by actual rule expressed in % of the whole set of examples.

Accuracy - Classification accuracy of the actual rule.

On the Progress panel information about learning progress is displayed:

Rules - Number of generated rules.

Specifications - Total number of specifications.

Conditions - Total number of conditions for all generated rules.


Algorithm CN2


At first, user must load some training dataset. Data tab is used for selection of attributes (database columns) and view, for training dataset.

On this page, list of attributes of selected view is presented. User can select required attributes. Right mouse click on particular attribute name will result in displaying of pop-up menu. In this menu user can change type of attribute and select class attribute. Algorithm CN2 enables to use two types of attributes - nominal, for string and logical data type (data type is type of database column) and ordered, for numeric (real or integer) and date data type. User can change nominal type to ordered. User must select some nominal attribute as class attribute. As default, last nominal attribute is selected as class attribute.

In order to load data with selected attributes user clicks on Load button.

After some data is loaded, information about loaded training dataset is displayed on Information panel. In particular:

Examples – total number of records in training dataset

Attributes – number of attributes (O - ordered, N - nominal)

Classes – number of classes

Class attribute – name of selected class attribute

Memory size – estimated memory size required for loading of the training dataset


Training data


On the Results panel graphical form of information (graphical map) about rules is displayed. Each rule is displayed as a bar coloured according to predicted class. Size of displayed bar expresses rule’s occurrence. In order to select and display interesting rule and switch back to algorithm tab, double click on selected rule bar is needed.

Below graphical map, information about selected rule is displayed:

Class – Predicted class of the actual rule.

Accuracy – Classification accuracy of the actual rule.

Occurrence – Total number of examples covered by actual rule expressed in % of the whole set of examples.

After testing of rules, results are displayed in form of contingency table. Contingency table shows number of examples classified properly and number of misclassified examples (i.e. examples classified into others than proper class). In this table accuracy for each class and overall accuracy are also displayed.


Results


Within this tab user can set up parameters of the RISE algorithm.

Remove uncovered rules - Remove rules, which do not cover any examples.

On the Rules panel the list of generated rules and information about rules is displayed. In this panel actual rule can be selected by positioning the cursor on the requested rule. Information about actual rule is displayed in distribution panel and rule information panel:

Distribution - Number of examples for each class covered (i.e. examples that satisfy the conditional part of the rule) by actual rule.

Occurrence - Total number of examples covered by actual rule expressed in % of the whole set of examples.

Accuracy - Classification accuracy of the actual rule.

On the Progress panel information about learning progress is displayed:

Rules - Number of generated rules.

Generalizations - Total number of generalizations.

Conditions - Total number of conditions for all generated rules.


Algorithm RISE


User can test generated rules on testing dataset. On Testing tab user can select view and algorithm for testing. Clicking on Test button will start the test process. After testing of rules, results are displayed in form of contingency table on Results tab.

User can change association between attributes and columns in tested view. User can make association for all attributes according to column's names when he/she clicks on >> button. When user wants to change some association, he/she needs to select particular attribute and column and click on > button. User can cancel association of actual attribute by clicking on < button, or cancel association for all attributes using the << button.


Testing


Within this tab user can set up parameters of the TWI algorithm.

Algorithm

Applying a RISE algorithm to a training set produces a set of rules that is called the S rules. Applying the general-to-specific learners produces a set of G rules.

TWI-1 - In the TWI-1 algorithm, the sets of S and G rules are merged to form a single set, deleting any duplicates. The Laplace accuracy of each rule on the examples than it covers is measured and the classification procedure of the RISE algorithm is applied to each training example. Each rule memorizes the number of examples it won, and how many of then it classify correctly. At the end, the Laplace accuracy of the each rule on the examples that it won is computed. At classification time the RISE classification procedure is applied without any distinction between S and G rules. The nearest to the test examples wins, if two or more rules are equally near, the one with highest Laplace accuracy prevails.

TWI-2 – In the TWI-2 algorithm, the sets of S and G rules are kept separate, and the Laplace accuracy of each rule on the training examples that it covers is measured. At classification time, the two sets of rules are first applied separately. A winner among the S rules is found by the RISE classification procedure. To select the G winner, the G rules are matched against the test example. If more than one rules covers the example, the one with highest Laplace accuracy wins. If no G rules covers examples, the default rule is chosen as the G winner. Of the two rules (S and G), the one with the highest accuracy then win the example.

TWI-ID3 – The TWI-2 algorithm proposed in previous chapter is based on stacked generalization architecture. In this architecture for classifier combination, classifier to be combined is denoted as level-0 classifiers, and the combining classifier is the level-1 classifier. Stacked generalization architecture may be iterated to create level-2 classifiers and so one. Each layers of the classifiers is used to combine the predictions of the classifiers in the layer immediately below. In TWI-2 algorithm, combining algorithm is voting (between two finalist). In the TWI-ID3 algorithm is combining classifier decision tree generated by ID3 algorithm. The task of the level-1 (and higher) classifier is to learn to use the contestant predictions classifier can be more sophisticated method to combine level-0 classifiers.

Remove uncovered rules - Remove rules, which do not cover any examples.

On the Rules panel the list of generated rules and information about rules is displayed. In this panel actual rule can be selected by positioning the cursor on the requested rule. Information about actual rule is displayed in distribution panel and rule information panel:

Distribution - Number of examples for each class covered (i.e. examples that satisfy the conditional part of the rule) by actual rule.

Occurrence - Total number of examples covered by actual rule expressed in % of the whole set of examples.

Accuracy - Classification accuracy of the actual rule.

On the Progress panel information about learning progress is displayed:

Rules (G, S) - Number of generated rules. S is number of CN2 rules and G is number of rules generated by RISE algorithm.

Conditions - Total number of conditions for all generated rules.


Algorithm TWI


Basic part of the KDD Package software is a set of communication functions and structures called kernel. It enables external modules of the KDD Package to access particular view(s), variables, data and view operations. Kernel also allows change view state, select, add and delete rows and columns. These features are provided by communication functions.

This part of help file describes important structures used for communication and exceptions. Moreover there are listed all communication functions supported by KDD Package kernel.

Views | Operations | Columns | Rows
GetViewsCount GetViewsID GetViewStruct GetViewName SetViewName GetActualView SetActualView CheckViewName GetViewEnabled SetViewEnabled GetViewPanel AddView DeleteView ForceDeleteView ClearViews ForceClearViews GetDataLoaded LoadData ClearView | AddOperation UpdateOperation ActivateOperation DeactivateOperation DeleteOperation GetActiveOperation GetOperation GetOperationCount FindReloadFunction | GetColumnName SetColumnName GetKDDColumnType GetBDEColumnType GetColumnRequired ToColumnType GetColumnTypeString GetColumnEmptyCount GetColumnAverage GetColumnMax GetColumnMin GetColumnSum GetDistinctValuesCount GetDistinctValues GetActualCol SetActualCol IncrementActualCol GetColsCount ValidateColumn ValidateAllColumns InsertColumn DeleteColumn DeleteSelectedCols | GetActualRow SetActualRow IncrementActualRow GetRowsCount InsertRow DeleteRow GetRowIndexes SetRowIndexes DeleteSelectedRows

Selecting functions | Items | Other functions
GetRowSelect SetRowSelect GetColSelect SetColSelect GetActualColSelect SetActualColSelect GetActualRowSelect SetActualRowSelect SetSelectType GetSelectType GetSelectedRowsCount GetSelectedColsCount GetSelectedRowsAllCount GetSelectedColsAllCount SetAllColSelect SetAllRowSelect InvertAllColSelect InvertAllRowSelect GetColSelectAtOnce GetRowSelectAtOnce SetColSelectAtOnce SetRowSelectAtOnce | GetItemAsString GetItemAsInteger GetItemAsFloat GetItemAsLogical GetItemAsDate GetItemEmpty SetItem SetItemEmpty | SendMessageToApp UpdateApplication SQLToView Config_WriteDateTime Config_WriteFloat Config_WriteInteger Config_WriteBoolean Config_WriteString Config_ReadDateTime Config_ReadFloat Config_ReadInteger Config_ReadBoolean Config_ReadString


Structure of operation informations

Definition of this structure is located in file Kernel.h. It is used for storing operation information. The definition has the following form:

typedef struct _TOperationInfo{

bool CanUndo;

bool CanReload;

bool CanRedo;

bool CanUndoThreadNeeded;

bool CanReloadThreadNeeded;

bool CanRedoThreadNeeded;

typedef void __fastcall TReloadFunction(int OperNumber, int ViewID, _TOperationInfo *Info);

typedef void __fastcall TRedoFunction(int OperNumber, int ViewID, _TOperationInfo *Info);

typedef void __fastcall TUndoFunction(int OperNumber, int ViewID, _TOperationInfo *Info);

TRedoFunction *RedoFunction;

TReloadFunction *ReloadFunction;

TUndoFunction *UndoFunction;

void *Data;

int Size;

char OperationName[1024];

char InternalOperationName[1024];

TStringList *Info;

bool FActive;

} TOperationInfo;

Description:

bool CanUndo – if this value is true, then operation supports function UNDO.

bool CanReload – if this value is true, then operation supports function RELOAD.

bool CanRedo – if this value is true, then operation supports function REDO.

bool CanUndoThreadNeeded – if this value is true, then operation requires to create separate thread of Windows system for function UNDO.

bool CanReloadThreadNeeded – if this value is true, then operation requires to create separate thread of Windows system for function RELOAD.

bool CanRedoThreadNeeded – if this value is true, then operation requires to create separate thread of Windows system for function REDO.

void *Data – pointer to custom operation data. If operation does not need data, then the pointer has value NULL.

int Size – size of custom operation data.

char OperationName[1024] – operation name.

char InternalOperationName[1024] – internal operation name.

TStringList *Info – list of strings that describe the operation.

Structure of user information for BDE

Definition of this structure is located in file Kernel.h. It is used for storing user information used by BDE. The definition has the following form:

typedef struct {

bool RemoteSQL;

char UserName[128];

char UserPassword[128];

} TUserData;

Description:

bool RemoteSQL – if this values is true, then BDE will connect to the remote database. Otherwise local database will be connected.

char UserName[128] – user name used for database connection.

char UserPassword[128] – user password used for database connection.

Object of Kernel exceptions

Definition of this object is located in file Kernel.h. It is used for storing information about generated exceptions. The definition has the following form:

class TKernelException:

property : int ErrorID

AnsiString Message

Description:

int ErrorID – error number.

AnsiString Message – error caption.

Object for displaying operation state

Definition of this object is located in file Kernel.h. It is used for displaying information about operation state. The definition has the following form:

class TTreePanel:

property:

TButton *FinishButton;

TButton *YesButton;

TButton *NoButton;

TTreeView *View;

TThread *Thread;

bool UserInput;

int ModalResult;

Description:

TButton *FinishButton – When this button is pressed the variable ModalResult will be set to ID_OK.

TButton *YesButton – When this button is pressed the variable ModalResult will be set to ID_YES.

TButton *NoButton – When this button is pressed the variable ModalResult will be set to ID_NO.

TTreeView *View – visual tree object.

TThread *Thread – pointer to the thread, that use this object.

bool UserInput - true/false - wait for user action/working.

int ModalResult - value that indicates last pressed button.


If some error occurs, KDD Package kernel generates exception. Content of generated exception is stored into the TKernelException class. In the next table all possible exceptions are described. They are ordered by exception index. First column contains exception number, stored in ErrorID variable of TKernelException. Second column contains description of generated exception that is stored in Message variable of TKernelException.

Table of kernel exceptions:

Exception number | Exception meaning
1 | Memory allocation error
2 | Internal database error
3 | Wrong ID
4 | View is locked
5 | Cannot delete all views
6 | String is too long
7 | Cannot read table item
8 | Data is already loaded
9 | View does not support data reloading
10 | Cannot generate list of distinct column values
11 | Cannot convert item to date or time value
12 | Index is out of range
13 | Selection type is out of range
14 | Cannot delete active operation
15 | Operation is already active
16 | Operation is already inactive
17 | Statistical value is not defined
18 | View must be locked
19 | Cannot convert item to integer value
20 | Cannot convert item to real value
21 | Cannot convert item to Boolean value
22 | Data is not ready
23 | Cannot write table item
24 | Cannot change table item in unlocked view
25 | Validation is possible only in locked view
26 | Validation is not possible
27 | Cannot add new row
28 | Number of items is out of range
29 | Logical row index is out of range
30 | Duplicate row
31 | Cannot add column of „Unknown“ type
32 | Table already contains column with same name
33 | Column name cannot be empty string
34 | Column name cannot contain space character
35 | First character of column name must be alphabetic character
36 | Column name cannot contain special characters


GetViewsCount - Function returns number of opened views.

Definition:

extern "C" int __export __fastcall GetViewsCount(void)

Properties:

Input: | None
Output: | Number of views
Exceptions: | None


GetViewsID - Function returns array of ID's of all opened views.

Definition:

extern "C" int* __export __fastcall GetViewsID(void)

Properties:

Input: | None
Output: | Pointer to array
Exceptions: | 1


GetViewStruct - Function returns pointer to view structure.

Definition:

extern "C" TViewItem* __export __fastcall GetViewStruct(int ViewID)

Properties:

Input: | View ID
Output: | Pointer to view structure
Exceptions: | 3


GetViewName - Function returns view name.

Definition:

extern "C" AnsiString __export __fastcall GetViewName(int ViewID)

Properties:

Input: | View ID
Output: | View name
Exceptions: | 3


SetViewName - Function sets new view name.

Definition:

extern "C" void __export __fastcall SetViewName(int ViewID, AnsiString Value)

Properties:

Input: | View ID New view name
Output: | None
Exceptions: | 3


GetActualView - Function returns ID of active view.

Definition:

extern "C" int __export __fastcall GetActualView(void)

Properties:

Input: | None
Output: | View ID
Exceptions: | None


SetActualView - Function set view to active view.

Definition:

extern "C" void __export __fastcall SetActualView(int ViewID)

Properties:

Input: | View ID
Output: | None
Exceptions: | 3


CheckViewName - Function checks view name for correctness.

Definition:

extern "C" bool __export __fastcall CheckViewName(AnsiString Value)

Properties:

Input: | String of tested view name
Output: | true/false - string is allowed/disallowed
Exceptions: | None


GetViewEnabled - Function returns whether the view is enabled or disabled.

Definition:

extern "C" bool __export __fastcall GetViewEnabled(int ViewID)

Properties:

Input: | View ID
Output: | true/false - view is enabled/disabled
Exceptions: | 3


SetViewEnabled - Function enable or disable view.

Definition:

extern "C" void __export __fastcall SetViewEnabled(int ViewID, bool Value)

Properties:

Input: | View ID true/false - enable/disable view
Output: | None
Exceptions: | 3


GetViewPanel - Function returns pointer to object of view panel.

Definition:

extern "C" TTreePanel* __export __fastcall GetViewPanel(int ViewID)

Properties:

Input: | View ID
Output: | Pointer to object of view panel
Exceptions: | 3


AddView - Function adds new empty view.

Definition:

extern "C" int __export __fastcall AddView(void)

Properties:

Input: | None
Output: | View ID
Exceptions: | 1, 2


DeleteView - Function deletes enabled view.

Definition:

extern "C" void __export __fastcall DeleteView(int ViewID)

Properties:

Input: | View ID
Output: | None
Exceptions: | 3, 4 + exceptions of ForceDeleteView


ForceDeleteView - Function deletes (also disabled) view.

Definition:

extern "C" void __export __fastcall ForceDeleteView(int ViewID)

Properties:

Input: | View ID
Output: | None
Exceptions: | 1, 3


ClearViews - Function delete (except disabled) all views.

Definition:

extern "C" void __export __fastcall ClearViews(void)

Properties:

Input: | None
Output: | None
Exceptions: | 5


ForceClearViews - Function deletes all (also disabled) views.

Definition:

extern "C" void __export __fastcall ForceClearViews(void)

Properties:

Input: | None
Output: | None
Exceptions: | 5


GetDataLoaded - Function checks whether view contains data.

Definition:

extern "C" bool __export __fastcall GetDataLoaded(int ViewID)

Properties:

Input: | View ID
Output: | true/false - View contains/not contains data
Exceptions: | 3


LoadData - Function loads view data.

Definition:

extern "C" void __export __fastcall LoadData(int ViewID)

Properties:

Input: | View ID
Output: | None
Exceptions: | 2, 3, 8, 9, 18


ClearView - Function delete all operations and data (optional) from view.

Definition:

extern "C" void __export __fastcall ClearView(int ViewID, bool Data)

Properties:

Input: | View ID true/false - Delete/Not delete data
Output: | None
Exceptions: | 3


AddOperation - Function adds new operation.

Definition:

extern "C" void __export __fastcall AddOperation(int ViewID, TOperationInfo *Info)

Properties:

Input: | View ID Pointer to operation structure
Output: | None
Exceptions: | 3


UpdateOperation - Function updates state of existing operation.

Definition:

extern "C" void __export __fastcall UpdateOperation(int ViewID, TOperationInfo *Info, int OperationIndex)

Properties:

Input: | View ID Pointer to operation structure Operation index
Output: | None
Exceptions: | 3


ActivateOperation - Function activates operation.

Definition:

extern "C" void __export __fastcall ActivateOperation(int ViewID, int OperationIndex)

Properties:

Input: | View ID Operation index
Output: | None
Exceptions: | 3, 15


DeactivateOperation - Function deactivates operation.

Definition:

extern "C" void __export __fastcall DeactivateOperation(int ViewID, int OperationIndex)

Properties:

Input: | View ID Operation index
Output: | None
Exceptions: | 3, 16


DeleteOperation - Function deletes operation.

Definition:

extern "C" void __export __fastcall DeleteOperation(int ViewID, int OperationIndex)

Properties:

Input: | View ID Operation index
Output: | None
Exceptions: | 3, 14


GetActiveOperation - Function returns validity state of operation.

Definition:

extern "C" bool __export __fastcall GetActiveOperation(int ViewID, int OperationIndex)

Properties:

Input: | View ID Operation index
Output: | true/false - operation is valid/not valid
Exceptions: | 3


GetOperation - Function returns pointer to the information structure of operation.

Definition:

extern "C" TOperationInfo* __export __fastcall GetOperation(int ViewID, int OperationIndex)

Properties:

Input: | View ID Operation index
Output: | Pointer to the structure
Exceptions: | 3


GetOperationCount - Function returns number of operations.

Definition:

extern "C" int __export __fastcall GetOperationCount(int ViewID)

Properties:

Input: | View ID
Output: | Number of operations
Exceptions: | 3


FindReloadFunction - Function returns pointer to the RELOAD function of operation.

Definition:

extern "C" TReloadFunction* __export __fastcall FindReloadFunction(AnsiString OperationName)

Properties:

Input: | Internal operation name
Output: | Pointer to the RELOAD function. NULL if function not exists
Exceptions: | None


GetColumnName - Function returns column name.

Definition:

extern "C" AnsiString __export __fastcall GetColumnName(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | Column name
Exceptions: | 3, 12


SetColumnName - Function sets new column name.

Definition:

extern "C" void __export __fastcall SetColumnName(int ViewID, int Col, AnsiString Value)

Properties:

Input: | View ID Column index Column name
Output: | None
Exceptions: | 3, 12


GetKDDColumnType - Function returns type of column in the form used by KDD Package .

Definition:

extern "C" int __export __fastcall GetKDDColumnType(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | Column type
Exceptions: | 3, 12

Note:

Possible column types are:

CT_UNKNOWN - unknown column type.

CT_INTEGER - column type is integer.

CT_STRING - column type is string.

CT_FLOAT - column type is float.

CT_LOGICAL - column type is boolean.

CT_DATE - column type is date.


GetBDEColumnType - Function returns column type in the form defined by BDE.

Definition:

extern "C" TFieldType __export __fastcall GetBDEColumnType(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | Column type
Exceptions: | 3, 12

Note:

For detailed information see BDE help in Borland Builder C++ 4.0.


GetColumnRequired - Function recognizes whether column allows empty values.

Definition:

extern "C" bool __export __fastcall GetColumnRequired(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | true/false - column not allow/allow empty values
Exceptions: | 3, 12


ToColumnType - Function coverts BDE column type to form used by KDD Package .

Definition:

extern "C" int __export __fastcall ToColumnType(TFieldType FieldType)

Properties:

Input: | BDE column type
Output: | KDD Column type
Exceptions: | None

Note:

Possible column types are:

CT_UNKNOWN - unknown column type.

CT_INTEGER - column type is integer.

CT_STRING - column type is string.

CT_FLOAT - column type is float.

CT_LOGICAL - column type is boolean.

CT_DATE - column type is date.


GetColumnTypeString - Function returns string that verbally describe BDE column type.

Definition:

extern "C" char* __export __fastcall GetColumnTypeString(TFieldType FieldType)

Properties:

Input: | BDE column type
Output: | Describing string
Exceptions: | None


GetColumnEmptyCount - Function returns number of empty values.

Definition:

extern "C" int __export __fastcall GetColumnEmptyCount(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | Number of empty values
Exceptions: | 3, 12


GetColumnAverage - Function returns average value of column.

Definition:

extern "C" Variant __export __fastcall GetColumnAverage(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | Average value
Exceptions: | 3, 12, 17


GetColumnMax - Function returns maximal value of column.

Definition:

extern "C" Variant __export __fastcall GetColumnMax(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | Maximal value
Exceptions: | 3, 12, 17


GetColumnMin - Function returns minimal value of column.

Definition:

extern "C" TReloadFunction* __export __fastcall FindReloadFunction(AnsiString OperationName)

Properties:

Input: | View ID Column index
Output: | Minimal value
Exceptions: | 3, 12, 17


GetColumnSum - Function returns sum of all values of column.

Definition:

extern "C" Variant __export __fastcall GetColumnSum(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | Sum
Exceptions: | 3, 12, 17


GetDistinctValuesCount - Function returns number of distinct values of column.

Definition:

extern "C" int __export __fastcall GetDistinctValuesCount(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | Number of distinct values
Exceptions: | 3, 10, 12


GetDistinctValues - Function returns list of distinct values of column.

Definition:

extern "C" TStringList* __export __fastcall GetDistinctValues(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | List of distinct values
Exceptions: | 3, 10, 12


GetActualCol - Function returns index of active column.

Definition:

extern "C" int __export __fastcall GetActualCol(int ViewID)

Properties:

Input: | View ID
Output: | Index of active column
Exceptions: | 3


SetActualCol - Function set new active column.

Definition:

extern "C" void __export __fastcall SetActualCol(int ViewID, int NewCol)

Properties:

Input: | View ID Index of new active column
Output: | None
Exceptions: | 3, 12


IncrementActualCol - Function increments position of active column by value.

Definition:

extern "C" void __export __fastcall IncrementActualCol(int ViewID, int HowManyVar)

Properties:

Input: | View ID Increment
Output: | None
Exceptions: | 3


GetColsCount - Function returns number of columns.

Definition:

extern "C" int __export __fastcall GetColsCount(int ViewID)

Properties:

Input: | View ID
Output: | Number of column
Exceptions: | 3


ValidateColumn - Function validates column.

Definition:

extern "C" void __export __fastcall ValidateColumn(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | None
Exceptions: | 3, 12, 22, 25, 26


ValidateAllColumns - Function validates all columns in the view.

Definition:

extern "C" void __export __fastcall ValidateAllColumns(int ViewID)

Properties:

Input: | View ID
Output: | None
Exceptions: | 3, 22, 25


InsertColumn - Function inserts new column into taken position.

Definition:

extern "C" void __export __fastcall InsertColumn(int ViewID, int Col, AnsiString ColumnName, int ColType)

Properties:

Input: | View ID Insert position Column name Column type
Output: | None
Exceptions: | 3, 12, 22, 24, 27


DeleteColumn - Function deletes column.

Definition:

extern "C" void __export __fastcall DeleteColumn(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | None
Exceptions: | 3, 12, 22, 24, 27


DeleteSelectedCols - Function deletes all selected columns.

Definition:

extern "C" void __export __fastcall DeleteSelectedCols(int ViewID, unsigned char SelectType)

Properties:

Input: | View ID Selection type
Output: | None
Exceptions: | 1, 3


GetActualRow - Function returns index of active row.

Definition:

extern "C" int __export __fastcall GetActualRow(int ViewID)

Properties:

Input: | View ID
Output: | Index of active row
Exceptions: | 3


SetActualRow - Function sets new active row.

Definition:

extern "C" void __export __fastcall SetActualRow(int ViewID, int NewRow)

Properties:

Input: | View ID New index
Output: | None
Exceptions: | 3, 12


IncrementActualRow - Function increments position of active row by taken value.

Definition:

extern "C" void __export __fastcall IncrementActualRow(int ViewID, int HowManyVar)

Properties:

Input: | View ID Increment value
Output: | None
Exceptions: | 3


GetRowsCount - Function returns number of rows.

Definition:

extern "C" int __export __fastcall GetRowsCount(int ViewID)

Properties:

Input: | View ID
Output: | Number of rows
Exceptions: | 3


InsertRow - Function insert new rows into taken position.

Definition:

extern "C" void __export __fastcall InsertRow(int ViewID, int Row, int Count)

Properties:

Input: | View ID Position Number of new rows
Output: | None
Exceptions: | 3, 12, 22, 24, 27


DeleteRow - Function deletes rows.

Definition:

extern "C" bool __export __fastcall DeleteRow(int ViewID, int Row, int Count)

Properties:

Input: | View ID Position of first row Number of rows
Output: | true/false - some column need/doesn't need validation
Exceptions: | 3, 12, 22, 24, 27, 28


GetRowIndexes - Function returns pointer to array of real position of rows in the view.

Definition:

extern "C" int* __export __fastcall GetRowIndexes(int ViewID)

Properties:

Input: | View ID
Output: | Pointer to array of indexes
Exceptions: | 3, 12, 22, 24, 27, 28


SetRowIndexes - Function sets new real position of rows in the view.

Definition:

extern "C" void __export __fastcall SetRowIndexes(int ViewID, int *NewIndexes)

Properties:

Input: | View ID Pointer to array of row positions
Output: | None
Exceptions: | 3, 12, 22, 24, 27, 28


DeleteSelectedRows - Function deletes selected rows.

Definition:

extern "C" bool __export __fastcall DeleteSelectedRows(int ViewID, unsigned char SelectType)

Properties:

Input: | View ID Selection type
Output: | true/false - some column need/doesn't need validation
Exceptions: | 1, 3


GetRowSelect - Function returns row selection type.

Definition:

extern "C" unsigned char __export __fastcall GetRowSelect(int ViewID, int Row)

Properties:

Input: | View ID Row index
Output: | 0 - row is not selected, otherwise selection type
Exceptions: | 3, 12


SetRowSelect - Function selects row with taken selection type.

Definition:

extern "C" void __export __fastcall SetRowSelect(int ViewID, int Row, unsigned char Value)

Properties:

Input: | View ID Row index Selection type (0 cause row deselection)
Output: | None
Exceptions: | 3, 12, 13


GetColSelect - Function returns column selection type.

Definition:

extern "C" unsigned char __export __fastcall GetColSelect(int ViewID, int Col)

Properties:

Input: | View ID Column index
Output: | 0 - column is not selected, otherwise column selection type
Exceptions: | 3, 12


SetColSelect - Function selects column with taken selection type.

Definition:

extern "C" void __export __fastcall SetColSelect(int ViewID, int Col, unsigned char Value)

Properties:

Input: | View ID Column index Selection type (0 cause column deselection)
Output: | None
Exceptions: | 3, 12, 13


GetActualColSelect - Function returns selection type of active column.

Definition:

extern "C" unsigned char __export __fastcall GetActualColSelect(int ViewID)

Properties:

Input: | View ID
Output: | Selection type (0 for unselected column)
Exceptions: | 3


SetActualColSelect - Function select active column with taken selection type.

Definition:

extern "C" void __export __fastcall SetActualColSelect(int ViewID, unsigned char Value)

Properties:

Input: | View ID Selection type (0 cause column deselection)
Output: | None
Exceptions: | 3, 13


GetActualRowSelect - Function returns selection type of active row.

Definition:

extern "C" unsigned char __export __fastcall GetActualRowSelect(int ViewID)

Properties:

Input: | View ID
Output: | 0 - row is not selected, otherwise selection type
Exceptions: | 3


SetActualRowSelect - Function select active row with taken selection type.

Definition:

extern "C" void __export __fastcall SetActualRowSelect(int ViewID, unsigned char Value)

Properties:

Input: | View ID Selection type (0 cause row deselection)
Output: | None
Exceptions: | 3, 13


SetSelectType - Function set new active selection type for rows and columns.

Definition:

extern "C" void __export __fastcall SetSelectType(int ViewID, unsigned char NewType)

Properties:

Input: | View ID New selection type
Output: | None
Exceptions: | 3, 13


GetSelectType - Function returns active selection type.

Definition:

extern "C" unsigned char __export __fastcall GetSelectType(int ViewID)

Properties:

Input: | View ID
Output: | Active selection type
Exceptions: | 3


GetSelectedRowsCount - Function returns number of selected rows with taken selection type.

Definition:

extern "C" int __export __fastcall GetSelectedRowsCount(int ViewID, unsigned char SelectType)

Properties:

Input: | View ID Selection type
Output: | Number of selected rows
Exceptions: | 3, 13


GetSelectedColsCount - Function returns number of selected columns with taken selection type.

Definition:

extern "C" int __export __fastcall GetSelectedColsCount(int ViewID, unsigned char SelectType)

Properties:

Input: | View ID Selection type
Output: | Number of selected columns
Exceptions: | 3, 13


GetSelectedRowsAllCount - Function returns number of selected rows (without reference to selection type).

Definition:

extern "C" int __export __fastcall GetSelectedRowsAllCount(int ViewID)

Properties:

Input: | View ID
Output: | Number of selected rows
Exceptions: | 3


GetSelectedColsAllCount - Function returns number of selected columns (without reference to selection type).

Definition:

extern "C" int __export __fastcall GetSelectedColsAllCount(int ViewID)

Properties:

Input: | View ID
Output: | Number of selected columns
Exceptions: | 3


SetAllColSelect - Function selects all columns with new selection type.

Definition:

extern "C" void __export __fastcall SetAllColSelect(int ViewID, unsigned char Value, bool Unselected)

Properties:

Input: | View ID Selection type true - function selects only unselected columns. Otherwise all columns will be selected.
Output: | None
Exceptions: | 3


SetAllRowSelect - Function selects all columns with new selection type.

Definition:

extern "C" void __export __fastcall SetAllRowSelect(int ViewID, unsigned char Value, bool Unselected)

Properties:

Input: | View ID Selection type true - function selects only unselected rows. Otherwise all rows will be selected.
Output: | None
Exceptions: | 3


InvertAllColSelect - Function inverts selections of all columns.

Definition:

extern "C" void __export __fastcall InvertAllColSelect(int ViewID, unsigned char Value, bool Unselected)

Properties:

Input: | View ID Selection type true - function inverts only unselected columns. Otherwise all column selections will be inverted.
Output: | None
Exceptions: | 3


InvertAllRowSelect - Function inverts selections of all rows.

Definition:

extern "C" void __export __fastcall InvertAllRowSelect(int ViewID, unsigned char Value, bool Unselected)

Properties:

Input: | View ID Selection type true - function inverts only unselected rows. Otherwise all row selections will be inverted.
Output: | None
Exceptions: | 3


GetColSelectAtOnce - Function returns pointer to the array filled with selection type of all columns.

Definition:

extern "C" unsigned char* __export __fastcall GetColSelectAtOnce(int ViewID)

Properties:

Input: | View ID
Output: | Pointer to the created array
Exceptions: | 1, 3


GetRowSelectAtOnce - Function returns pointer to array filled with selection type of all rows.

Definition:

extern "C" unsigned char* __export __fastcall GetRowSelectAtOnce(int ViewID)

Properties:

Input: | View ID
Output: | Pointer to created array
Exceptions: | 1, 3


SetColSelectAtOnce - Function selects all columns according to values of taken array, that contains selection type of each column in the view.

Definition:

extern "C" void __export __fastcall SetColSelectAtOnce(int ViewID, unsigned char *Values)

Properties:

Input: | View ID Pointer to the array
Output: | None
Exceptions: | 1, 3


SetRowSelectAtOnce - Function selects all rows according to values of taken array, that contains selection type of each row in the view.

Definition:

extern "C" void __export __fastcall SetRowSelectAtOnce(int ViewID, unsigned char *Values)

Properties:

Input: | View ID Pointer to the array
Output: | None
Exceptions: | 1, 3


GetItemAsString - Function returns value of item of view table as string.

Definition:

extern "C" AnsiString __export __fastcall GetItemAsString(int ViewID, int Row, int Col)

Properties:

Input: | View ID Row index Column index
Output: | Item value
Exceptions: | 3, 7, 12, 22


GetItemAsInteger - Function returns value of item of view table as integer.

Definition:

extern "C" long int __export __fastcall GetItemAsInteger(int ViewID, int Row, int Col)

Properties:

Input: | View ID Row index Column index
Output: | Item value
Exceptions: | 3, 12, 19, 22


GetItemAsFloat - Function returns value of item of view table as float.

Definition:

extern "C" double __export __fastcall GetItemAsFloat(int ViewID, int Row, int Col)

Properties:

Input: | View ID Row index Column index
Output: | Item value
Exceptions: | 3, 12, 20, 22


GetItemAsLogical - Function returns value of item of view table as boolean.

Definition:

extern "C" bool __export __fastcall GetItemAsLogical(int ViewID, int Row, int Col)

Properties:

Input: | View ID Row index Column index
Output: | Item value
Exceptions: | 3, 12, 21, 22


GetItemAsDate - Function returns value of item of view table as date.

Definition:

extern "C" TDateTime __export __fastcall GetItemAsDate(int ViewID, int Row, int Col)

Properties:

Input: | View ID Row index Column index
Output: | Item value
Exceptions: | 3, 11, 12, 22


GetItemEmpty - Function checks whether the item is empty.

Definition:

extern "C" bool __export __fastcall GetItemEmpty(int ViewID, int Row, int Col)

Properties:

Input: | View ID Row index Column index
Output: | true/false - item is/isn't empty
Exceptions: | 3, 7, 12, 22


SetItem - Function sets new value of item.

Definition:

extern "C" bool __export __fastcall SetItem(int ViewID, int Row, int Col, AnsiString Value)

Properties:

Input: | View ID Row index Column index New value as string
Output: | true/false - some column need/doesn't need validation
Exceptions: | 3, 12, 22, 23, 24


SetItemEmpty - Function sets item to empty.

Definition:

extern "C" bool __export __fastcall SetItemEmpty(int ViewID, int Row, int Col)

Properties:

Input: | View ID Row index Column index
Output: | None
Exceptions: | 3, 12, 22, 23, 24


SendMessageToApp - Function sends specified message to the main application.

Definition:

extern "C" void __export __fastcall SendMessageToApp(TMessage *Message)

Properties:

Input: | Message structure
Output: | None
Exceptions: | None


UpdateApplication - Function updates state of main application.

Definition:

extern "C" void __export __fastcall UpdateApplication(void)

Properties:

Input: | None
Output: | None
Exceptions: | None


SQLToView - Function executes user specified SQL commands and store results to the view.

Definition:

extern "C" void __export __fastcall SQLToView(int ViewID, TStringList *SQL, TParams *Param, AnsiString AliasName, TUserData UserData)

Properties:

Input: | View ID List of SQL statements List of SQL parameters Alias name User identification data
Output: | None
Exceptions: | None


Config_WriteDateTime - Function writes date and time value to the KDD Package INI file.

Definition:

extern "C" void __export __fastcall Config_WriteDateTime(AnsiString Section, AnsiString Ident, TDateTime Value)

Properties:

Input: | Section name Key name Value
Output: | None
Exceptions: | None


Config_WriteFloat - Function writes float value to the KDD Package INI file.

Definition:

extern "C" void __export __fastcall Config_WriteFloat(AnsiString Section, AnsiString Ident, double Value)

Properties:

Input: | Section name Key name Value
Output: | None
Exceptions: | None


Config_WriteInteger - Function writes integer value to the KDD Package INI file.

Definition:

extern "C" void __export __fastcall Config_WriteInteger(AnsiString Section, AnsiString Ident, int Value)

Properties:

Input: | Section name Key name Value
Output: | None
Exceptions: | None


Config_WriteBoolean - Function writes boolean value to the KDD Package INI file.

Definition:

extern "C" void __export __fastcall Config_WriteBoolean(AnsiString Section, AnsiString Ident, bool Value)

Properties:

Input: | Section name Key name Value
Output: | None
Exceptions: | None


Config_WriteString - Function writes string value to the KDD Package INI file.

Definition:

extern "C" void __export __fastcall Config_WriteString(AnsiString Section, AnsiString Ident, AnsiString Value)

Properties:

Input: | Section name Key name Value
Output: | None
Exceptions: | None


Config_ReadDateTime - Function reads date and time value from the KDD Package INI file.

Definition:

extern "C" TDateTime __export __fastcall Config_ReadDateTime(AnsiString Section, AnsiString Ident, TDateTime DefaultValue)

Properties:

Input: | Section name Key name Default value
Output: | Value from INI file. If value not exists, then default value will be returned.
Exceptions: | None


Config_ReadFloat - Function reads float value from the KDD Package INI file.

Definition:

extern "C" double __export __fastcall Config_ReadFloat(AnsiString Section, AnsiString Ident, double DefaultValue)

Properties:

Input: | Section name Key name Default value
Output: | Value from INI file. If value not exists, then default value will be returned.
Exceptions: | None


Config_ReadInteger - Function reads integer value from the KDD Package INI file.

Definition:

extern "C" int __export __fastcall Config_ReadInteger(AnsiString Section, AnsiString Ident, int DefaultValue)

Properties:

Input: | Section name Key name Default value
Output: | Value from INI file. If value not exists, then default value will be returned.
Exceptions: | None


Config_ReadBoolean - Function reads boolean value from the KDD Package INI file.

Definition:

extern "C" bool __export __fastcall Config_ReadBoolean(AnsiString Section, AnsiString Ident, bool DefaultValue)

Properties:

Input: | Section name Key name Default value
Output: | Value from INI file. If value not exists, then default value will be returned.
Exceptions: | None


Config_ReadString - Function reads string value from the KDD Package INI file.

Definition:

extern "C" AnsiString __export __fastcall Config_ReadString(AnsiString Section, AnsiString Ident, AnsiString DefaultValue)

Properties:

Input: | Section name Key name Default value
Output: | Value from INI file. If value not exists, then default value will be returned.
Exceptions: | None


KDD Package - Kernel


KDD Package - Kernel - Objects and structures


KDD Package - Exceptions


KDD Package - Kernel functions - GetViewsCount


KDD Package - Kernel functions - GetViewsID


KDD Package - Kernel functions - GetViewStruct


KDD Package - Kernel functions - GetViewName


KDD Package - Kernel functions - SetViewName


KDD Package - Kernel functions - GetActualView


KDD Package - Kernel functions - SetActualView


KDD Package - Kernel functions - CheckViewName


KDD Package - Kernel functions - GetViewEnabled


KDD Package - Kernel functions - SetViewEnabled


KDD Package - Kernel functions - GetViewPanel


KDD Package - Kernel functions - AddView


KDD Package - Kernel functions - DeleteView


KDD Package - Kernel functions - ForceDeleteView


KDD Package - Kernel functions - ClearViews


KDD Package - Kernel functions - ForceClearViews


KDD Package - Kernel functions - GetDataLoaded


KDD Package - Kernel functions - LoadData


KDD Package - Kernel functions - ClearView


KDD Package - Kernel functions - AddOperation


KDD Package - Kernel functions - UpdateOperation


KDD Package - Kernel functions - ActivateOperation


KDD Package - Kernel functions - DeactivateOperation


KDD Package - Kernel functions - DeleteOperation


KDD Package - Kernel functions - GetActiveOperation


KDD Package - Kernel functions - GetOperation


KDD Package - Kernel functions - GetOperationCount


KDD Package - Kernel functions - FindReloadFunction


KDD Package - Kernel functions - GetColumnName


KDD Package - Kernel functions - SetColumnName


KDD Package - Kernel functions - GetKDDColumnType


KDD Package - Kernel functions - GetBDEColumnType


KDD Package - Kernel functions - GetColumnRequired


KDD Package - Kernel functions - ToColumnType


KDD Package - Kernel functions - GetColumnTypeString


KDD Package - Kernel functions - GetColumnEmptyCount


KDD Package - Kernel functions - GetColumnAverage


KDD Package - Kernel functions - GetColumnMax


KDD Package - Kernel functions - GetColumnMin


KDD Package - Kernel functions - GetColumnSum


KDD Package - Kernel functions - GetDistinctValuesCount


KDD Package - Kernel functions - GetDistinctValues


KDD Package - Kernel functions - GetActualCol


KDD Package - Kernel functions - SetActualCol


KDD Package - Kernel functions - IncrementActualCol


KDD Package - Kernel functions - GetColsCount


KDD Package - Kernel functions - ValidateColumn


KDD Package - Kernel functions - ValidateAllColumns


KDD Package - Kernel functions - InsertColumn


KDD Package - Kernel functions - DeleteColumn


KDD Package - Kernel functions - DeleteSelectedCols


KDD Package - Kernel functions - GetActualRow


KDD Package - Kernel functions - SetActualRow


KDD Package - Kernel functions - IncrementActualRow


KDD Package - Kernel functions - GetRowsCount


KDD Package - Kernel functions - InsertRow


KDD Package - Kernel functions - DeleteRow


KDD Package - Kernel functions - GetRowIndexes


KDD Package - Kernel functions - SetRowIndexes


KDD Package - Kernel functions - DeleteSelectedRows


KDD Package - Kernel functions - GetRowSelect


KDD Package - Kernel functions - SetRowSelect


KDD Package - Kernel functions - GetColSelect


KDD Package - Kernel functions - SetColSelect


KDD Package - Kernel functions - GetActualColSelect


KDD Package - Kernel functions - SetActualColSelect


KDD Package - Kernel functions - GetActualRowSelect


KDD Package - Kernel functions - SetActualRowSelect


KDD Package - Kernel functions - SetSelectType


KDD Package - Kernel functions - GetSelectType


KDD Package - Kernel functions - GetSelectedRowsCount


KDD Package - Kernel functions - GetSelectedColsCount


KDD Package - Kernel functions - GetSelectedRowsAllCount


KDD Package - Kernel functions - GetSelectedColsAllCount


KDD Package - Kernel functions - SetAllColSelect


KDD Package - Kernel functions - SetAllRowSelect


KDD Package - Kernel functions - InvertAllColSelect


KDD Package - Kernel functions - InvertAllRowSelect


KDD Package - Kernel functions - GetColSelectAtOnce


KDD Package - Kernel functions - GetRowSelectAtOnce


KDD Package - Kernel functions - SetColSelectAtOnce


KDD Package - Kernel functions - SetRowSelectAtOnce


KDD Package - Kernel functions - GetItemAsString


KDD Package - Kernel functions - GetItemAsInteger


KDD Package - Kernel functions - GetItemAsFloat


KDD Package - Kernel functions - GetItemAsLogical


KDD Package - Kernel functions - GetItemAsDate


KDD Package - Kernel functions - GetItemEmpty


KDD Package - Kernel functions - SetItem


KDD Package - Kernel functions - SetItemEmpty


KDD Package - Kernel functions - SendMessageToApp


KDD Package - Kernel functions - UpdateApplication


KDD Package - Kernel functions - SQLToView


KDD Package - Kernel functions - Config_WriteDateTime


KDD Package - Kernel functions - Config_WriteFloat


KDD Package - Kernel functions - Config_WriteInteger


KDD Package - Kernel functions - Config_WriteBoolean


KDD Package - Kernel functions - Config_WriteString


KDD Package - Kernel functions - Config_ReadDateTime


KDD Package - Kernel functions - Config_ReadFloat


KDD Package - Kernel functions - Config_ReadInteger


KDD Package - Kernel functions - Config_ReadBoolean


KDD Package - Kernel functions - Config_ReadString


In order to build prediction models using M5 algorithm, user needs to perform the following steps:

1. Load data into KDD-Package environment.

2. Split data into training and testing datasets.

3. Set algorithm parameters and run learning process (i.e. build prediction model).

4. Test learned models on testing dataset.

Data can be loaded from local or remote databases, or text files. Another possibility is to get data directly from Excel program. The M5 module loads data from actual view. User can select required attributes. Right click on particular attribute name will result in displaying of pop-up menu. In this menu user can change type of attribute and select predicted attribute. Module M5 enables to use two types of attributes - string, for string and logical data type and float, for numeric (real or integer) data type. User must select some float attribute as predicted attribute. As default, last float attribute is selected as predicted attribute.


On the Options table, user can select the prediction method.

It is possible to use the following methods:

- linear regression

- regression tree

- model tree

For regression tree and model tree, user can change level of pruning (default value is 2). To smooth the model tree Smoothing tree option must be checked. Information about actual settings is displayed in Setting information panel. Clicking on Prediction button results in building selected prediction model.


On the Result table, result of the prediction is displayed in textual form.

For linear regression, resulting linear model and prediction accuracy are displayed. For regression and model tree, unpruned tree is displayed at first. Pruned version of the tree is presented afterwards. User can save results into a text file. He/she needs to click on Save button and insert file name. As a default, prefix for the file name is based on used prediction method (LR – linear regression, RT – regression tree, MT – model tree and U and P for pruned and unpruned tree respectively).


User can test generated models on testing dataset. Testing dataset must have identical name and data type for each attribute in training dataset.

After testing user can display all examples with prediction error greater than selected value. These examples are probably inaccurate and user can omit these examples from next processing.


On the Graph table it is possible to display dependency between two attributes from training dataset. User must select which one of the attributes will be displayed on X axe and which one on the Y axe. Selected attributes must be numeric and different.

On the Tree table, user can display graphical representation of the model tree. In order to display information about particular node user needs to click on the left mouse button. For intermediate node, value and attribute name of the node condition are displayed. When user clicks on a leaf node, the linear model belonging to this node is displayed.

User can save displayed tree as a bitmap file by clicking on Save button and inserting a file name.


Algorithm M5 - Data


Algorithm M5 - Options


Algorithm M5 - Result


Algorithm M5 - Testing


Algorithm M5 - Graph and tree


KDD Package was developed for supporting external modules. These modules can provide to KDD Package some useful procedures for data preparation or some algorithms of machine learning for data mining etc. User can sipmly configure which modules will be loaded with application. By this feature, application become strong tool for support full process of Knowledge Discovering In Databases.

This section describe how user can write external module for the KDD Package. All of external modules, that are placed in the standard application configuration, was written in Borland Builder C++. KDD Package was written in this programming enviroment too. So the next steps describes how to write module in Borland Builder C++.

For successful module creation is needed four external files, that user need to add into project. There are:

KDD_Package.lib

Kernel.h

KernelInternal.h

Functions.h

These files are located into KDD Package installation directory.

Step 1:

User creates new project of type DLL (see picture). In the main menu of Builder C++ user chooses item File and the item New in expanded submenu. After confirming by button OK Builder C++ create new empty project.

Step 2:

In the Project manager window user need to add KDD_Package.lib file into new project. Click right mouse button on the Project1.dll item in the visual tree. Displayed popup menu contains item called Add. Click on this menu item.

Step 3:

Builder C++ opens dialog for setting file name. User need to locate KDD_Package.lib file and click Open button. File will be added into the project.

Step 4:

Other files Kernel.h, KernelInternal.h and Functions.h user adds into project using #include command of C++ language.

#include "Kernel.h"

#include "KernelInternal.h"

#include "Functions.h"


Structure TDllHeader

This structure is used for storing values of parameters that KDD Package needs for correct communication and external module control. Also provides to modules accession to application menu items that was created for module control. Module must correctly fill these structure.

Definition of this structure is located in Kernel.h file. Here is a part of that file:

typedef struct _TDllHeader{

HINSTANCE Library;

char ModuleName[1024];

int MenuItemsCount;

TList *MenuItems;

TList *MenuHints;

int *MenuCommands;

TShortCut *MenuShortcuts;

TPageControl* ConfigPanel;

ProcModule_Init *Module_Init;

ProcModule_ExecuteCommand *Module_ExecuteCommand;

ProcModule_Close *Module_Close;

ProcModule_Unload *Module_Unload;

ProcModule_Name *Module_Name;

ProcModule_EnableControls *Module_EnableControls;

ProcModule_UpdateControls *Module_UpdateControls;

ProcModule_GetReloadFunction *Module_GetReloadFunction;

TList *MenuItemPointers;

} TDllHeader;

Description:

HINTANCE Library – variable contains instance number of loaded DLL module. This number use Windows for next communication with loaded module. Variable is filled by KDD Package.

char ModuleName[1024] – module name. It helps with module identification or it displays to user module name. Maximal length is 1023 characters. Filled by module.

int MenuItemsCount – module sets the number of added menu items. This menu items are next located in the main menu of KDD Package. Filled by module.

TList *MenuItems – list of strings that represents location and name of menu items. String has following form:

"Root\nNode_1\n.. Node_n\nItem_Name"

Root – Item in the main menu of KDD Package (location in the menu bar).

Node_1 až Node_n – submenu in the next level of menu Root.

Item_Name – name of the final menu item.

All names are separated by ‚\n‘ character. Filled by module.

TList *MenuHints - list of hint associated with menu items. Filled by module.

int *MenuCommands – array of command numbers for each menu item. If menu item is not assigned to any command, then the value is -1. Filled by module.

TShortCut *MenuShortcuts – array of shortcuts of menu items. Filled by module.

TPageControl *ConfigPanel – pointer to object that represents visual component of type TPageControl used for visual configuration of this module. If module doesn't need any configuration, the the variable has value NULL. Filled by module.

ProcModule_Init *Module_Init – pointer to module communication function called Module_Init. Filled by application.

ProcModule_ExecuteCommand *Module_ExecuteCommand – pointer to module communication function called Module_ExecuteCommand. Filled by application.

ProcModule_Close *Module_Close – pointer to module communication function called Module_Close. Filled by application.

ProcModule_Unload *Module_Unload – pointer to module communication function called Module_Unload. Filled by application.

ProcModule_Name *Module_Name – pointer to module communication function called Module_Name. Filled by application.

ProcModule_EnableControls *Module_EnableControls – pointer to module communication function called Module_EnableControls. Filled by application.

ProcModule_UpdateControls *Module_UpdateControls – pointer to module communication function called Module_UpdateControls. Filled by application.

ProcModule_GetReloadFunction *Module_GetReloadFunction – pointer to module communication function called Module_GetReloadFunction. Filled by application.

TList *MenuItemPointers – list of pointers to objects that represents menu items added by application. Pointers are of type TMenuItem*. Filled by application.


Module_Load

Function is called immediately load module to the memory. Task of the function is correctly fill TDllHeader structure. It has a form:

extern "C" TDllHeader* __export __fastcall Module_Load(void)


Module_Init

Function is called when the loading of all modules is finished. All modules is already in the memory. Function serve for module initialization. That usually means initialization of formulars or setting some module parameters. It has a form:

extern "C" void __export __fastcall Module_Init(void)


Module_Close

Function is called when the main application is closing. All modules is still in the memory. Function serve for module finalization. That usually means close all created formulars or saving some module parameters. It has a form:

extern "C" void __export __fastcall Module_Close(void)


Module_Unload

Function is called closely before application unload this module from memory. Function serve for module freeing from memory. That usually means deletes variables and free all allocated memory. It has a form:

extern "C" void __export __fastcall Module_Unload(void)


Module_Name

Function is called when application needs recognize module name. This function was implemented on the score of getting the module name without requirement of module initialization. It has a form:

extern "C" char* __export __fastcall Module_Name(void)

The body of this function can be simple:

extern "C" char* __export __fastcall Module_Name(void)

{

return ModuleName;

}


Module_EnableControls

Task of this function is enable or disable menu items assigned to module. About enabling/disabling decides a variable State. Value true means that menu items will be enabled. Value false on the other side means that menu items will be disabled. It has a form:

extern "C" void __export __fastcall Module_EnableControls(bool State)

Possible form of function body:

extern "C" void __export __fastcall Module_EnableControls(bool State)

{

for (int i = 0; i < MenuItemsCount; i++) {

try {

((TMenuItem*)Header.MenuItemPointers->Items[i])->Enabled = State;

} catch (...) { }

}


Module_UpdateControls

Task of this function is enable/disable some menu items assigned to the module adequate to actual module state. That usually means disable such function, which cannot be execute. It has a form:

extern "C" void __export __fastcall Module_UpdateControls(void)


Module_ GetReloadFunction

Application call this function when it need reload function with name stored in the variable OperationName. If module doesn't support function with taken name, returns NULL. Otherwise module returns pointer to the function. It has a form:

extern "C" TReloadFunction* __export __fastcall Module_GetReloadFunction (AnsiString OperationName)


Module_ ExecuteCommand

Application call this function when user select the enu item that belong to module. Selected procedure is specified by variable Comand. The body of function usually contains switch command. It has a form:

extern "C" void __export __fastcall Module_ExecuteCommand(int Command)


Module development


Module development - TDllHeader structure


Module development - Module_Load


Module development - Module_Init


Module development - Module_Close


Module development - Module_Unload


Module development - Module_Name


Module development - Module_EnableControls


Module development - Module_UpdateControls


Module development - Module_ GetReloadFunction


Module development - Module_ ExecuteCommand


Random sampling tool randomly select required count of examples. You can set required count of examples (in %) and type of selection. For classification data-mining model, you can select required count of examples independently for each class. You must select class attribute (only nominal attribute can by selected as class attribute), in this case.


Random sampling


Modul_preparation_stat_down

 Statistical sampling tool is a method based on convergence of the variability. User can select attributes which are included in calculation of the data set variability.

User can set these particular parameters:

1. Confidence level

User can select required level of confidence for the sampling process.

1. Selection type

User can set required selection type, which will be assigned with selected examples (rows) of the active view table.

1. Unselect all

Checking this button will remove all assignments of examples from the active view table before running random sampling process.

In order to run the sampling process Execute button must be clicked on.

When the sampling process finishes, on page Results the following information will be presented:

Name - attribute name

Type - type of the attribute (nominal or ordered)

Max, Min - maximum and minimum value of the attribute (if the attribute is ordered)

Distinct - number of distinct values (if the attribute is nominal)

Empty - number of empty values

Confidence level - calculated confidence level


Statistical sampling


By using this function, user can normalize column by method called Change scale. Function is located in main menu of KDD application in section Column->Normalization->Change scale.

After activation application displays follow form:

User checks this button and algorithm will find the unknown coeficient of normalization and uses it for next normalization process.

User puts the value of coeficient to the edit box and algorithm use it for next normalization process.

User confirms settings by button OK. To cancel operation user uses button Cancel. About work progress the user is informed in the panel Operations.


By using this function, user can normalize column by method called Normalization using variance. Function is located in main menu of KDD application in section Column->Normalization->Variance.

After activation application displays follow form:

User checks this button and algorithm will find the unknown coeficients of normalization and uses them for next normalization process.

User puts the value of coeficients to the edit boxes and algorithm use them for next normalization process.

User confirms settings by button OK. To cancel operation user uses button Cancel. About work progress the user is informed in the panel Operations.


Attribute normalizations - Change scale


Attribute normalizations - Using variance


 Each function, which changes state of the active view (e.g. assignment of particular rows/columns, number of rows or columns etc.), is called operation. Consecutive execution of these operations builds a queue of operations. This queue (list) is part of each opened view within the KDD Package.
List of operations is displayed in the panel Operations. State and variables of operation are saved along with each operation. This makes it possible to program new operations in such a way that it will support three standard functions:
  1. UNDO - reverses changes carried out by this operation, i.e. brings the active view into the state that was before execution of last operation
  2. REDO - opposite to UNDO, i.e. brings the active view into the state that was after execution of last operation without necessity to reexecute last operation
  3. RELOAD - operation will be executed again.
Information about all functions supported by particular operation can user find in panel Operations. Moreover, there are seven functions provided to the user for management of the queue of operations:


 Function reverses the last operation. If the last operation does not support UNDO function, then this function is disabled.


 Function reverses all operations int the queue except the first one. If any of the operations does not support UNDO function, then this function is disabled.


 Function redoes the last undone operation. If the operation does not support REDO function, then this function is disabled.


 Function redoes all undone operations in the queue. If any of the operations does not support REDO function, then this function is disabled.


 Function reverses the last operation and deletes it from the operation queue. If the last operation does not support function UNDO, application will ask if user wants to use the reload function instead. If the user agrees, the reload function will be executed.


 Function reverses all operations except the first one and deletes them from the operation queue.


 Function reexecutes all operations in the operation queue. If any of operations does not support RELOAD function, then this function is disabled.


What is an operation?


Undo operation


Undo all operations


Redo operation


Redo all operations


Delete operation


Delete all operations


Reload all operations


Function simply renames actual column. It provides the following form:

Form is divided into two areas and has two more buttons.

Old name:

- In this area current name of the actual column is displayed.

New name:

- User can type new column name.

Cancel button:

- Clicking on this button will close this form and cancel the operation without changing the column name.

Confirmation button:

- By clicking on this button user confirms the new column name. If the new column name is not a correct one or other column with the same name exists, the process of renaming will be interrupted. Otherwise the column will rename.


Rename items


 This function ("find and replace") is a strong tool for replacing values in the column with another one. User can replace vales for more items at once. It can be effectively used e.g. for eliminating empty or missing values in particular column.

This windows is divided into five areas and contains two more buttons.

Item values to be replaced:

- In this area user can type value for replacing. If user checks the Empty… checkbox, function will replace the empty items in the appropriate column. The is user informed about work progress in the Operations panel.

Replace with:

- In this area user can type value that will be used for replacement. If user checks the Empty… checkbox, function will simply clear all items with value specified in the "Item values to be replaced" area. If user checks the Previous value… checkbox, function will replace items with value specified in the "Item values to be replaced" with the previous value.

Direction:

- User can set direction of the "find and replace" process.

Origin:

- This area is used for setting up starting position of the "find and replace" process.

Scope:

- In this area user defines the scope of table where "find and replace" process will take place. User can choose between global scope and scope defined by selected rows.

If the user press the OK button, import process will continue. The user is informed about work progress in the panel Operations.


Replace column


There are all functions that work with rows. They can be divided into four groups:

Change active select type:

Type 1 - Set active selection type to type 1.
Type 2 - Set active selection type to type 2.
Type 3 - Set active selection type to type 3.
Type 4 - Set active selection type to type 4.

Functions for row selection:

Select/Deselect actual row - Function assignes/removes assignment of actual row with the active selection type.
Select all - Function assignes all rows with the active selection type.
Select all unselected - Function assignes all not currently assigned rows with the active selection type.
Deselect all - Function removes assignment of all rows.
Deselect all of actual type - Function deselects all rows that are selected with active select type.
Invert selection - Function inverts assignment of all rows in the active view table with respect to their current assignment. Rows assigned with actual selection type become unassigned and opposite (rows assigned with other selection types remain unaffected).
Invert selection without reference to type - Function inverts assignment of all rows in the active view table without respect to their current assignment. Rows assigned with actual selection type become unassigned and all other rows become assigned with actual selection type.
Special - Special techniques for row selection (often known as sampling procedures) used within the preparation phase of the KDD process.
Select multiple rows - Function can select multiple block of rows (useful when preprocessing data from data warehouses).
Statistical sampling - Statistical sampling method based on convergence of the variability.
Random sampling - Random selection of required number of rows.

Functions that work with clipboard:

Copy to... - Function copies selected rows to the clipboard.
Move to... - Function moves selected rows to the clipboard.
Add from... - Function adds new rows from clipboard at the end of the active view table.

Other functions:

Add - Function adds new row with empty values at the end of the active view table.
Insert - Function inserts new row with empty values to the actual row position.
Delete - Functions for deleting rows:
Delete actual - Function for deleting of the actual row.
Delete selected - Function for deleting of all rows that are selected with active selection type.


Row functions - Overview


 Function adds a new row at the end of the view table. All values in the new row will be empty. Values of statictical variables for each column are updated automatically.


Add new row


 Clipboard is dedicated to temporary storage of blocks of data from view tables. User can copy or move to the clipboard only data blocks as several rows or columns. Notice, there is only one clipboard available. There are three functions that work with rows and clipboard:

1. Copy rows to clipboard
2. Move rows to clipboard
2. Add rows from clipboard


 Function copies all rows assigned with active selection type to the clipboard. This operation can take more time if the number of rows is high. The user is informed about work progress in the panel Operations.


 Function copies all rows assigned with active selection type to the clipboard. Afterwards, all selected rows are deleted from the active view table. Values of statictical variables for each column are updatet automatically. This operation can take more time if the number of rows is high. The user is informed about work progress in the panel Operations.


 Function copies current content of the clipboard as new rows at the end of the active view table. If the number of columns in clipboard is less than the number of columns in the active view table, items in the remaining part of columns become empty values. In other case, function copies as many columns from the clipboard to the active view table as many columns are presented there. Values of statictical variables for each column are updated automatically. This operation can take more time if the number of rows or columns is high. The user is informed about work progress in the panel Operations.


Rows and clipboard - Overview


Rows and clipboard - Copy to clipboard


Rows and clipboard - Move to clipboard


Rows and clipboard - Add from clipboard


 Function deletes row(s) from the active view table. Two functions are provided:

1. Delete actual row
2. Delete selected rows


 Function deletes actual row (row, where the cursor is currently positioned) from the active view table. Values of statictical variables for each column are updated automatically. This operation can take more time if the number of rows is high.


 Function deletes all rows that are assigned with active selection type from the active view table. Values of statictical variables for each column are updated automatically. This operation can take more time if the number of rows or columns is high. The user is informed about work progress in the panel Operations.


Delete rows - Overview


Delete actual row


Delete selected rows


 Function inserts new row at the actual row position. All values in the new row will be empty. Values of statictical variables for each column are updated automatically.


Insert new row


 Rows int the active view table can be assigned with four various selection types. KDD Package offers various functions for selection of rows. From the most simple one, which is select one row up to the special, more complicated slection functions and special sampling procedures. These special functions are often dedicated to special algorithms for data maining and as such their number can be increased when a new module is plugged into the KDD Packge.

In the basic configuration the following selection (and sampling) functions are provided:

Select/Deselect actual row - Function assignes/removes assignment of actual row with the active selection type.
Select all - Function assignes all rows with the active selection type.
Select all unselected - Function assignes all not currently assigned rows with the active selection type.
Deselect all - Function removes assignment of all rows.
Deselect all of actual type - Function deselects all rows that are selected with active selection type.
Invert selection - Function inverts assignment of all rows in the active view table with respect to their current assignment. Rows assigned with actual selection type become unassigned and opposite (rows assigned with other selection types remain unaffected).
Invert selection without reference to type - Function inverts assignment of all rows in the active view table without respect to their current assignment. Rows assigned with actual selection type become unassigned and all other rows become assigned with actual selection type.
Special - Special techniques for row selection (often known as sampling procedures) used within the preparation phase of the KDD process.
Select multiple rows - Function can select multiple block of rows (useful when preprocessing data from data warehouses).
Statistical sampling - Statistical sampling method based on convergence of the variability.
Random sampling - Random selection of required count of rows.


 This function depends on the current state of the actual row (where the cursor is currently positioned) in the active view table.
  1. If the actual row is currently not assigned with any selection type, then it will be assigned with the active selection type.
  2. If the actual row is already assigned with other selection type than the currently active selection type is, then its old assignment will be removed and the actual row will be assigned with the active selection type.
  3. Otherwise, i.e. in case that the actual row is already assigned with the currently active selection type, this assignment will be removed.


 Function assignes all rows with the active selection type. If some row is already assigned with different selection type as the currently active selection type is, then its old assignment will be removed and the actual row will be assigned with the active selection type.


 Function assignes all not currently assigned rows with the active selection type. If some row is already assigned with other selection type than the currently active selection type is, then this assignment will not be changed.


 Function removes assignment of all rows (does not matter with which selection type particular rows have been assigned). As result of this function, no row in active view table will be assigned with any selection type.


 Function removes assignment of all rows that are assigned with active selection type. If some row is already assigned with other selection type than the currently active selection type is, then its assignment will not be changed.


 Function inverts assignment of all rows in the active view table with respect to their current assignment with particular selection type.
  1. If a row is not assigned with any selection type, then this row will be assigned with currently active selection type.
  2. If a row is already assigned with currently active selection type, then this assignment will be removed.
  3. Otherwise, i.e. if a row is already assigned with other selection type than the currently active selection type is, this assignment will stay unchanged.


 Function inverts assignment of all rows in the active view table without respect to their current assignment with particular selection type. Rows assigned with actual selection type become unassigned and all other rows become assigned with actual selection type.


 KDD package provides procedures and functions for special kinds of row selection (sampling procedures). These functions are provided by external modules. In basic configuration the following three special selection strategies are provided:

Select multiple rows
Statistical sampling
Random sampling


 Function can select multiple block of rows. This functionality is useful when data from data warehouses are preprocessed. Dialog form for setting up parameters for this function seems like:

Four parameters have to be set up:

1. Start line

First row to be selected is specified here by its serial number. In such a way it is possible to jump over some number of rows from the start of the active view table.

2. Periode

It means number of rows that will separate two blocks of continuously selected rows. It is the distance of two consecutive blocks.

3. Number of continuous selected lines

It is number of continuowsly selected rows. It is the size of a block of continuously selected rows.

4. Used select type

User can choose which selection type will be used for assignment. Option Actual means that currently active selection type will be used. Option Custom enables user to specify other selection type.

There are two buttons used for confirmation of given settings and canceling this function:

If user press this button, execution of this function will be canceled.

If user press this button, given settings will be set up and selection function will be ran. The user is informed about work progress in the panel Operations.


Row select functions - Overview


Select/Deselect row


Select all rows


Select all unselected rows


Deselect all rows


Deselect all rows of actual type


Invert row selections


Invert row selections without reference to type


Row select functions - Special - Overview


Row select functions - Select multiple rows


 Within each view rows and/or columns may be assigned with four different assignment marks - so called selection types. Active selection type is common for rows and columns. If user selects some row(s) and/or or column(s), currently active selection type is used for their assignment. User can change currently active selection type using function change active selection type through the main menu or through buttons on the tool bar. Indication of active selection type is following:

Indication - active selection type is type 1

Indication - active selection type is type 3


Setting selection type


Function splits a column into several others. It can be applied only for string and logical types of
columns (not numeric)! The process will start showing the following form:

Form is divided into two areas (Data column and Used values) and includes two buttons (Cancel and Confirm).

Data column:

Data column provides the list box with names of all other columns (except of the column which should be splitted) in the current table. User will choose one column name values of which will be used for filling newly added columns.

Used values:

There is a list of all distinct values of the source column (to be splitted). Function will create as many new columns as number of selected distinct values will be. User can define which items in the list will be used.

Cancel button:

Pressing this button will close this form and cancel the operation.

Confirm button:

User confirms that everything is all right. new column name. The user is informed about progress of work by messages on the Operations panel.


Split column


 KDD package makes it possible to create or open an view without necessity to load data into it. It is signalized in the Data panel:

Later on, user or some data mining algorithm will require them. So application provides function to get these data later on. The user needs only to click inside of the Data panel. Process of loading data will start. After confirmation the process will finish. The user is informed about progress of work by messages on the Operations panel.


Get data


This area is used in order to display the list of opened views. Highlighted item is the name of active view. To switch to another view the user simply clicks on the required view name and it becomes active.


View list


 KDD package allows user to load previously saved view from the file. What does it means? Application loads from the given file only the list of operations and its variables. No data is loaded. So KDD Package must execute all of these operations in order to reconstruct the original state.

Application first asks for a file name. It displays this standard window formular:

User needs to list path and select or type required file name. After confirmation the process of original state reconstruction will continue. The user is informed about progress of work by messages on the Operations panel. If some operation is not presented or generates an error, the program will ask to leave the view in current state. User can either leave this view in current (not completely reconstructed) state or cancel its loading.


Load view


 KDD package allows user to save the active view into a file. What does it mean? Application saves only the list of operations and its parameters. No data is saved. So KDD Package must execute all of these operations in order to load this saved view later on (see Load View).

Application first asks user for a file name. It displays this standard window formular:

User needs to list path and select or type required file name. After confirmation the process of saving active view state will
continue. The user is informed about progress of work by messages on the Operations panel.


Save view


Panel is used for switching active views. After a click on the button placed in the right hand side, panel will unroll the list of names of opened views. User can activate particular view by selecting its name from the given list.


View switching


This area displays content of the active view. View can be displayed in three different ways (modes) which represent different granularity levels of the view:

Tabs with modes' names provide quick way of switching between these modes. Only one of the three possible modes can be displayed at once.

Each view may be in one of the following two states:

1. View is enabled - which is signed by a book icon before the view name. In this case currently no operation works with this view and user can inspect its content using all three modes.

2. View is disabled - which is signed by a question mark icon before the view name. In this case currently some operation works with this view and user cannot inspect content of this view at the Quick view and Data level. Only mode Operation is available.


This mode provides access to list of operations that have been executed on active view. Panel is accessible by clicking on the Operations tab. It seems like that:

It contains list of operations (so called operation queue). This list is represented by simple tree. Detail information can be obtained by expanding a node with operation name. Character of this information depends on operation type. Common part of this information is information about supporting of standard UNDO, REDO and RELOAD functions. Example:

First node contains the following information: Operation name. Next node includes information about support for standard functions which is provided by given operation (in our example it is only RELOAD operation). Third node, called Detail information, contains specific information dependent on operation type.

Panel also contains four buttons for management of operation queue:

Undo - Function reverses the last operation in the operation queue.
Redo - Function redoes the previously undone operation.
Delete - Function reverses and deletes the last operation in the operation queue.
Reload - Function reloads all operations in the operation queue.

In case that the view is disabled, this panel displays information about progress of actual running operation. Deatils are described in help sections related to particular operations.


This mode displays list column names and values of some statistical variables for each column from the active view table. This information is always available without necessity of loading the data.

Panel is divided into two parts:

Column list

On the left hand side the list of column names is displayed. Just active column is highlighted.

Statistical variables

This panel is divided into next two subparts. In order to switch between them the users just clicks on the appropriate tab.

Statistical variables

Panel related to this tab displayes column type, column name and values of the following statistical variables.

Column name - Column name of active column.
Column type - Active column type according to the BDE specification.
Empty value - has two possible values:

    • enabled means that active column can contain empty values and
    • disabled means that active column cannot contain empty values.
Rows count - Number of rows in active view table.
Count of empty values. - Number of empty values in active column.
Count of distinct values - Number of distinct values in active column. It is computed only for string and logical types of columns. In other cases it has value None.
Minimum - Minimum value of all items in the column. It is computed only for numeric types of columns. In other cases it has value None.
Average - Average value of all items in the column. It is computed only for numeric types of columns. In other cases it has value None.
Maximum - Maximum value of all items in the column. It is computed only for numeric types of columns. In other cases it has value None.
Sum - Sum of all items in the column. It is computed only for numeric types of columns. In other cases it has value None.

List of distinct values

Panel related to this tab is applicable only for string and logical types of columns presenting counts of particular value occurences. Panel is divided into two subparts. On the left hand side part is presented list of distinct values in active column. On the right hand side counts for each of these values in active column are displayed.


This is the finest granularity level mode for display of an active view. In this mode active view is presented as a table of data.

Panel is divided into three parts:

Table

Table displayes all data of the active view. First row contains column names. Width of each column can be changed by the user. User takes the column separator and moves it to the required position. Current column width is signalized by vertical line as shown in the following picture:

First column contains row indexes. If the row or column is selected, the selection mark will be added to the index of that row or to the column name resp. There are four various marks there signed by different numbers (1 to 4), e.g.:

- Row selection: Type 2

Information

On the right hand side a panel with useful information about the current table is displayed. There is presented the following information:

Row number - Actual row number.
Column number - Actual column number.
Row: Selection - type 1 - Number of rows that are selected with selection type 1.
Row: Selection - type 2 - Number of rows that are selected with selection type 2.
Row: Selection - type 3 - Number of rows that are selected with selection type 3.
Row: Selection - type 4 - Number of rows that are selected with selection type 4.
Row: Selection - all types - Number of rows that are selected with arbitrary selection type.
Column: Selection - type 1 - Number of columns that are selected with selection type 1.
Column: Selection - type 2 - Number of columns that are selected with selection type 2.
Column: Selection - type 3 - Number of columns that are selected with selection type 3.
Column: Selection - type 4 - Number of columns that are selected with selection type 4.
Column: Selection - all types - Number of columns that are selected with arbitrary selection type.

Tool bar

At the bottom of this panel a toolbar with buttons for setting up selection type for active view is presented. Pressed button indicates currently active selection type. Current selection type is valid for rows as well as for columns selection.


View panel


View panel - Operations


View panel - Quick view


View panel - Data