Wednesday, October 1, 2008

Activity 19: Probabilistic Classification

In this activity, a different method was implemented to classify images into their proper classes using the features used from the previous activity. The objects used are fishballs and squidballs. There are still 4 training sets and 4 test sets for each object. The features used were still the ratio between the height and the width, and each of their R-G-B values.

Objects used:

The method used here is Linear Discrimination Analysis (LDA), wherein a linear transformation of the features (X) and classes (Y) is determined, such that the transformed values on the new axes maximizes the differences between the features of one class from the other.

The set of features are shown below.
To start, the features were first assigned to their classes (x1= fishballs, and x2=squidballs). Then the mean(μ) was calculated for each class i, and was used to calculate the mean corrected data(xi0) given by the equation:



Then, the covariance matrix (C) was determined using the equations:



The probability (p) that the object feature is assigned to a class i is just the total sample of each class divided by the total samples.

With all the calculated values, the LDA formula given by the equation below, where fi is the linear discriminant, μi is the mean of the feature, C is the covariance matrix, xk is the set of features, and pi is the conditional probability, is used. The object will then be assigned to the class where its calculated linear discriminant is highest.



Results show that:


From the table above, it was shown that 100% of the objects were successfully classified to their proper classes. The objects were assigned to the class where their calculated linear discriminant is highest.
rating: 10 bec. proper classification was done..

No comments: