Appendix G. Format of the Evidence Visualizer's Data File

The purpose of this appendix is to describe the Evidence Visualizer's input data file. This file is a textual representation of the evidence classifier. The data file is generated automatically through the Tool Manager. In some instances one may wish to edit this file in order to alter label, attribute, or value names.

The Evidence Visualizer requires a data file containing the label and attributes, along with weights and probabilities. These are used to create the graphics. It is output as a result of running the Evidence Inducer through the Tool Manager. The format of the data file is:

#MineSet 2.5
<type> "<label>" <L>
"<label1>" <weight1> <probability1>
"<label2>" <weight2> <probability2>
:
"<labelL>" <weightL> <probabilityL>

<M>

<type> "<attrib1>" <N1> <importance1>
"<value1_1>" <weight1_1_1> <prob1_1_1> ... <weight1_1_L> <prob1_1_L>
"<value1_2>" <weight1_2_1> <prob1_2_1> ... <weight1_2_L> <prob1_2_L>
:
"<value1_N1>" <weight1_N1_1> <prob1_N1_1> ... <weight1_N1_L> <prob1_N1_L>

<type> "<attrib2>" <N2> <importance2>
"<value2_1>" <weight2_1_1> <prob2_1_1> ... <weight2_1_L> <prob2_1_L>
"<value2_2>" <weight2_2_1> <prob2_2_1> ... <weight2_2_L> <prob2_2_L>
:
"<value2_N2>" <weight2_N2_1> <prob2_N2_1> ... <weight2_N2_L> <prob2_N2_L>

:
:
:

"<attribM>" <NM> <importanceM>
"<valueM_1>" <weightM_1_1> <probM_1> ... <weightM_1_L> <probM_1_L>
"<valueM_1>" <weightM_2_1> <probM_2_2> ... <weightM_2_L> <probM_2_L>
:
"<valueM_NM>" <weightN1_NM_1> <probM_NM_1> ... <weightM_NM_L> <probM_NM_L>

history {
:
:
}

Where L is the number of label values, M is the number of attributes, and N is the number of values or bins for attribute i. The <>'s indicate variables. The actual file has numbers or strings. A NULL is considered a unique value if it is present in an attribute. If NULLs exist for an attribute they always appear as the first value (i.e., the first line following the attribute header) and are represented by "?".

The <type> can be

Lines beginning with # are comments (and ignored by the program).

An optional history section can be included at the end of the file. It is used by Tool Manager for drill-through. Without this section, drill-through is not possible (in the Evidence Visualizer or any other MineSet tool).

The weights are the number of records (or sum of weights) in the table with that particular attribute value (or range of values); hence, the sum of the weights for each attribute equals the total number of records in the table (unless record weighting was used). The probability is the number of weights for that attribute value divided by the total number of weights. If the data file was generated with Laplace correction turned on, the probability is only approximately the number of weights for that attribute value divided by the total number of weights (see “Refining the Inducer With Further Options” in Chapter 13). Thus, the probability value indicates the proportion of records with a particular label that have this attribute value instead of another value.

Data files must have a .eviviz extension. When starting the Evidence Visualizer, or when opening a file, you must specify the data file.

A sample Evidence Visualizer data file, /usr/lib/MineSet/eviviz/examples/cars.eviviz, follows.

#MineSet 2.5
#automatically generated
NOMINAL "origin" 3
"Europe" 73 0.179803
"Japan" 79 0.194581
"US" 254 0.625616
6
AUTO_ENUM "mpg" 5 25.448
"?" 3 0.0410959 0 0 5 0.019685
"- 16.1" 0 0 0 0 87 0.34252
"16.1-21.05" 10 0.136986 5 0.0632911 77 0.30315
"21.05-30.95" 43 0.589041 28 0.35443 67 0.26378
"30.95+" 17 0.232877 46 0.582278 18 0.0708661
NOMINAL "cylinders" 5 29.1759
"8" 0 0 0 0 108 0.425197
"4" 66 0.90411 69 0.873418 72 0.283465
"6" 4 0.0547945 6 0.0759494 74 0.291339
"3" 0 0 4 0.0506329 0 0
"5" 3 0.0410959 0 0 0 0
AUTO_ENUM "horsepower" 4 22.3514
"?" 2 0.0273973 0 0 4 0.015748
"- 78.5" 40 0.547945 46 0.582278 25 0.0984252
"78.5-134" 31 0.424658 33 0.417722 131 0.515748
"134+" 0 0 0 0 94 0.370079
AUTO_ENUM "weightlbs" 4 28.5157
"- 2379.5" 43 0.589041 57 0.721519 30 0.11811
"2379.5-2959.5" 18 0.246575 22 0.278481 57 0.224409
"2959.5-3274" 9 0.123288 0 0 29 0.114173
"3274+" 3 0.0410959 0 0 138 0.543307
AUTO_ENUM "time_to_60" 3 10.0055
"- 13.45" 3 0.0410959 3 0.0379747 78 0.307087
"13.45-19.45" 52 0.712329 75 0.949367 162 0.637795
"19.45+" 18 0.246575 1 0.0126582 14 0.0551181
AUTO_ENUM "year" 1 2.84217e-14
"ignore" 73 1 79 1 254 1

Note that the sum of the probabilities corresponding to a particular label value for a given attribute always equals 1. Consider the attribute weightlbs, for label value US (the first one), we have .11811+.224409+.114173+.543307=1.0 . Also note that attributes mpg and horsepower have NULL values.

The eviviz datafile (*.eviviz) also accommodates loss matrices and optionally included Laplace factor. The next example .eviviz file contains both of these.

MineSet 2.5
# MLC++ generated file for MineSet Evidence Visualizer.
NOMINAL “edibility” 2
“edible” 5 0.621212121212
“poisonous” 3 0.378787878788

TOTAL 8

LAPLACE yes 0

LOSS
10 0 20 
10 10000 0 


3

NOMINAL “cap-shape” 6 47.6129309656
“bell” 1 0.195652173913 0 0.0333333333333
“conical” 0 0.0217391304348 0 0.0333333333333
“convex” 2 0.369565217391 2 0.566666666667
“flat” 2 0.369565217391 0 0.0333333333333
“knobbed” 0 0.0217391304348 1 0.3
“sunken” 0 0.0217391304348 0 0.0333333333333

NOMINAL “cap-surface” 4 27.8397591211
“fibrous” 2 0.386363636364 0 0.0357142857143
“grooves” 0 0.0227272727273 0 0.0357142857143
“scaly” 1 0.204545454545 2 0.607142857143
“smooth” 2 0.386363636364 1 0.321428571429

NOMINAL “cap-color” 10 47.6129309656
“brown” 1 0.18 1 0.264705882353
“buff” 0 0.02 0 0.0294117647059
“cinnamon” 0 0.02 0 0.0294117647059
“gray” 0 0.02 1 0.264705882353
“green” 0 0.02 0 0.0294117647059
“pink” 1 0.18 0 0.0294117647059
“purple” 0 0.02 0 0.0294117647059
“red” 1 0.18 0 0.0294117647059
“white” 1 0.18 1 0.264705882353
“yellow” 1 0.18 0 0.0294117647059

The LaPlace matrix follows the form shown in the GUI (see the description in “Loss Matrices” in Chapter 10.)