Docsity

Homework Assignment #10 - Data Mining | INFSCI 2160, Assignments of Information Technology

Toggle sidebar
bg1
KITTIPONG TECHAPANICHGUL
INFSCI 2160: DATA MINING
PAGE: 1
Homework 10&11
Due date: Dec 7, 2005
The selected database information
Database Name: Letter Recognition Database
From: David Slate
Based on: various fonts
Instances: 20,000 instances (712565 bytes) (.Z available)
Attributes: 17 attributes: 1 class (letter category) and 16 numeric (integer)
Additional Information: No missing attribute values
Objective: The objective is to identify each of a large number of black-and-white rectangular
pixel displays as one of the 26 capital letters in the English alphabet. The character images were
based on 20 different fonts and each letter within these 20 fonts was randomly distorted to
produce a file of 20,000 unique stimuli. Each stimulus was converted into 16 primitive numerical
attributes (statistical moments and edge counts) which were then scaled to fit into a range of
integer values from 0 through 15. We typically train on the first 16000 items and then use the
resulting model to predict the letter category for the remaining 4000. See the article cited above
for more details.
Attribute Information:
1. lettr capital letter (26 values from A to Z)
2. x-box horizontal position of box (integer)
3. y-box vertical position of box (integer)
4. width width of box (integer)
5. high height of box (integer)
6. onpix total # on pixels (integer)
7. x-bar mean x of on pixels in box (integer)
8. y-bar mean y of on pixels in box (integer)
9. x2bar mean x variance (integer)
10. y2bar mean y variance (integer)
11. xybar mean x y correlation (integer)
12. x2ybr mean of x * x * y (integer)
13. xy2br mean of x * y * y (integer)
14. x-ege mean edge count left to right (integer)
15. xegvy correlation of x-ege with y (integer)
16. y-ege mean edge count bottom to top (integer)
17. yegvx correlation of y-ege with x (integer)
pf3
pf4
pf5

Partial preview of the text

Download Homework Assignment #10 - Data Mining | INFSCI 2160 and more Assignments Information Technology in PDF only on Docsity!

INFSCI 2160: DATA MINING PAGE: 1

Homework 10&

Due date: Dec 7, 2005

The selected database information

Database Name: Letter Recognition Database From: David Slate Based on: various fonts Instances: 20,000 instances (712565 bytes) (.Z available) Attributes: 17 attributes: 1 class (letter category) and 16 numeric (integer) Additional Information: No missing attribute values Objective: The objective is to identify each of a large number of black-and-white rectangular pixel displays as one of the 26 capital letters in the English alphabet. The character images were based on 20 different fonts and each letter within these 20 fonts was randomly distorted to produce a file of 20,000 unique stimuli. Each stimulus was converted into 16 primitive numerical attributes (statistical moments and edge counts) which were then scaled to fit into a range of integer values from 0 through 15. We typically train on the first 16000 items and then use the resulting model to predict the letter category for the remaining 4000. See the article cited above for more details. Attribute Information:

  1. lettr capital letter (26 values from A to Z)
  2. x-box horizontal position of box (integer)
  3. y-box vertical position of box (integer)
  4. width width of box (integer)
  5. high height of box (integer)
  6. onpix total # on pixels (integer)
  7. x-bar mean x of on pixels in box (integer)
  8. y-bar mean y of on pixels in box (integer)
  9. x2bar mean x variance (integer)
  10. y2bar mean y variance (integer)
  11. xybar mean x y correlation (integer)
  12. x2ybr mean of x * x * y (integer)
  13. xy2br mean of x * y * y (integer)
  14. x-ege mean edge count left to right (integer)
  15. xegvy correlation of x-ege with y (integer)
  16. y-ege mean edge count bottom to top (integer)
  17. yegvx correlation of y-ege with x (integer)

INFSCI 2160: DATA MINING PAGE: 2

Data Analysis

The data in this database allows interested researchers to reveal understanding about the English letter recognition from the given attributes. However, it needs some kinds of algorithms to figure out what the relationships between each letter and the given attributes are. As a consequence, choosing appropriate models in Clementine to figure that out is a good start for the data analysis. The C5.0 node and neural net model node were being used to find out the facts hidden in this database. Also, the characteristics of each letter will be revealed by those two models as well.

For the first attempt, the C5.0 node retrieves the data samples randomly (25%) as inputs. After it ran completely, a decision tree was created. The first three attributes used to recognize the letter of the decision tree are shown in the chart below (because the tree is very big, it is hard to display the entire tree. So, I pick only an important part to display).

After that, the accuracy of the decision tree had been measured by comparing between attribute “lettr” and the new attribute ($CC-lettr) obtained from the C5.0 node. Using the analysis node, the result came out as follow:

Correct 4165 82.67% Wrong 873 17.33% Total 5038

At this point, the accuracy of this decision tree is high enough to be used for letter characterization according the given attributes. For that reason, it convinces us that each of the letters tends to have unique characteristics (the pattern of the attribute values). For example, letter “J” is likely to have the value of attribute “x-ege” <= 1.

To improve the accuracy of the decision tree, another attempt has been made. By resizing the sample size to be 50% random, the first three attributes of the decision tree are shown as follow:

x-ege

y-bar y-ege

y-ege x2ybr x-ege xy2br

<=1 >

<=8 >8 <=2 >

INFSCI 2160: DATA MINING PAGE: 4 Now it is the neural net turn. Because the neural network is another powerful alternative that can be used to classify data and predict a group the data should belong to. It is a good candidate for this problem, the goal of which is letter recognition by learning from a given data set. As a result, the neural net node has been chosen as another model for mining this database.

After let the neural net node learn from a dataset reserved as a training set (¾ of the entire data has been reserved for the training set), the accuracy of the neural net node with 10 hidden nodes in the first layer is shown in the left column while the weight of the input nodes is in the right column.

Correct 11341 75.61% Wrong 3659 24.39% Total 15000

Unfortunately, the accuracy of the neural net node with 10 hidden nodes in the first layer for the test set (the other ¼ of the entire data reserved as a test set) seems to be lower than the training set. The result came out as follow:

Correct 3653 73.06% Wrong 1347 26.94% Total 5000

To increase the percentage of the neural net accuracy, adding not only hidden nodes but also hidden layers seems to be a good idea. As a result, another neural net with 20 hidden nodes in the first layer and 15 hidden nodes in the second layer was created. After let the neural net

INFSCI 2160: DATA MINING PAGE: 5

node learn from a dataset reserved as a training set (¾ of the entire data has been reserved for the training set), its accuracy and the weight of input nodes are shown in the table below.

Correct 12609 84.06% Wrong 2391 15.94% Total 15000

Like the previous case, the accuracy of the neural net node with 20 hidden nodes in the first layer and 15 hidden nodes in the second layer for the test set (the other ¼ of the entire data reserved as a test set) seems to be lower than the training set. The result came out as follow:

Correct 4106 82.12% Wrong 894 17.88% Total 5000

To conclude, the accuracy of the neural net nodes are acceptable because it is still over 80% which can be indicated as a high accuracy level.