• No results found

The class category or the group ( good and bad ) is what we are looking for (it is also called dependent variable).

N/A
N/A
Protected

Academic year: 2022

Share "The class category or the group ( good and bad ) is what we are looking for (it is also called dependent variable)."

Copied!
9
0
0

Loading.... (view fulltext now)

Full text

(1)

(These notes are from Teknomo Kardi)

Discriminant analysis

Discriminant analysis is a statistical technique to classify objects into mutually exclusive and exhaustive groups based on a set of measurable object's features. One example is the Linear

Discriminant Analysis (LDA) or Fisher LDA, which is used for a 2-class classification problem. If the number of classes is more than two, it is also sometimes called Multiple Discriminant Analysis (MDA).

Purpose

The purpose of Discriminant Analysis is to classify objects (people, customers, things, etc.) into one of two or more groups based on a set of features that describe the objects (e.g. gender, age, income, weight, preference score, etc. ).

Linear Discriminant Analysis

For example, we want to know whether a soap product is good or bad based on several measurements on the product such as weight, volume, people's preferential score, smell, color contrast etc. The object here is soap.

The class category or the group (“good” and “bad”) is what we are looking for (it is also called dependent variable).

Each measurement on the product is called features that describe the object (it is also called independent variable).

Thus, in discriminant analysis, the dependent variable (Y) is the group and the independent variables (X) are the object features that might describe the group. The dependent variable is always category (nominal scale) variable while the independent variables

(2)

can be any measurement scale (i.e. nominal, ordinal, interval or ratio).

If we can assume that the groups are linearly separable, we can use linear discriminant model (LDA). Linearly separable suggests that the groups can be separated by a linear combination of

features that describe the objects. If only two features, the

separators between objects group will become lines. If the features are three, the separator is a plane and the number of features (i.e.

independent variables) is more than 3, the separators become a hyper-plane.

LDA Formula

Using classification criterion to minimize total error of

classification (TEC), we tend to make the proportion of object that it misclassifies as small as possible. TEC is the performance rule in the 'long run' on a random sample of objects. Thus, TEC should be thought as the probability that the rule under consideration will misclassify an object. The classification rule is to assign an object to the group with highest conditional probability . This is called Bayes Rule. This rule also minimizes the TEC. If there are g groups, the Bayes' rule is to assign the object to group where

.

We want to know the probability that an object is belong to group , given a set of measurement . In practice however, the quantity of is difficult to obtain. What we can get is . This is the probability of getting a particular set of measurement given that the object comes from group .

For example, after we know that the soap is good or bad then we can measure the object (weight, smell, color etc.). What we

(3)

want to know is to determine the group of the soap (good or bad) based on the measurement only.

Fortunately, there is a relationship between the two conditional probabilities via the Bayes Theorem:

Prior probability is probability about the group known

without making any measurement. In practice we can assume the prior probability is equal for all groups or based on the number of sample in each group.

In practice, however, to use the Bayes rule directly is

unpractical because to obtain need so much data to get the relative frequencies of each groups for each measurement.

It is more practical to assume the distribution and get the probability theoretically. If we assume that each group has multivariate Normal distribution and all group has the same covariance matrix, we get what is called Linear discriminant Analysis formula:

Then assign object to group that has maximum

(4)

Linear Discriminant Analysis Numerical Example

Factory “ABC” produces very expensive and high quality chip rings that their qualities are measured in term of curvature and diameter. Result of quality control by experts is given in the table below.

Curvature Diameter Quality Control Result

2.95 6.63 Passed

2.53 7.79 Passed

3.57 5.65 Passed

3.16 5.47 Passed

2.58 4.46 Not Passed 2.16 6.22 Not Passed 3.27 3.52 Not Passed

Now assume you have new chip rings with curvature 2.81 and diameter 5.46. You want to predict/classify this new ring into passed or not passed.

Solutions

When we plot the features, we can see that the data is linearly separable. We can draw a line to separate the two groups. The problem is to find the line and to rotate the features in such a way to maximize the distance between groups and to minimize distance within group.

(5)

= features (or independent variables) of all data. Each row (denoted by ) represents one object; each column stands for one feature.

= group of the object (or dependent variable) of all data. Each row represents one object and it has only one column.

In our example, and

= data of row . For example, , = number of groups in . In our example, = 2

= features data for group . Each row represents one object;

each column stands for one feature. We separate into several groups based on the number of category in .

(6)

,

= mean of features in group i, which is average of

i.e., ,

= global mean vector, that is mean of the whole data set.

In this example,

= mean corrected data, that is the features data for group , , minus the global mean vector

,

= covariance matrix of group That is,

,

(7)

= pooled within group covariance matrix.

It is calculated for each entry in the matrix. In our example, (4/7)*0.166 + (3/7)*0.259 = 0.206, (4/7)*-0.192) + (3/7)*(-0.286)

= -0.232, and (4/7)*1.349 + (3/7)*2.142, therefore

The inverse of the pooled covariance matrix is

= prior probability vector (each row represent prior probability of group ). If we do not know the prior probability, we just assume it is equal to total sample of each group divided by the total samples, that is

Discriminant function is:

We shall assign object to group that has maximum

(8)

The results of our computation are given in MS Excel as shown in the figure below.

The discriminant function is our classification rule to assign the object into separate group.

From our results, since f2 > f1, therefore the new chip rings with curvature 2.81 and diameter 5.46 belong to class “2”, i.e., it does not pass the quality control.

Transforming all data into discriminant function we can draw the training data and the prediction data into new

coordinate. The discriminant line is all data of discriminant

function and .

See the Excel Table for the values of f1 and f2. Here is the plot.

(9)

References

Related documents

Quality: We measure quality (Q in our formal model) by observing the average number of citations received by a scientist for all the papers he or she published in a given

All the figures and tables should be labeled (Times New Roman 11) and included in list of figures and list of tables respectively.

In this study, it is aimed to develop the Science Education Peer Comparison Scale (SEPCS) in order to measure the comparison of Science Education students'

When transfecting HEK 293T cells with either “mIFP-P2A-mNG2(full)” or “mIFP- P2A-mNG211SpyCatcher and mNGX1-10 (X represent 2, 3A or 3K)”, we observed both mNG31-10

This research presented in this thesis the performance of the three-phase grid-connected inverter and takes into account the principles design, analysis and comparison

A modest expansion of the number of potential candidates may be considered on the basis of several studies showing comparable survival for patients outside the Milan criteria. 3b

• The NCIN program activities supported not only the NCIN Scholars, but also other students in accelerated and non-accelerated nursing programs at many case study

Based on this understanding, this work focuses on the effect of the inclusion of shallow donor dopant such as gallium into the normal cadmium chloride post-growth treatment as