Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(20 marks) Carry out LDA to classify the data points provided above to Class 1 and 2. Note that all calculations in Part (a) should

image text in transcribed

(20 marks) Carry out LDA to classify the data points provided above to Class 1 and 2. Note that all calculations in Part (a) should be done by hand. The three steps involved are reproduced below for easy reference: Step 1. Apply LDA to project high-dimensional input vectors into one dimension. Step 2. Estimate , on the y-space for each of the two classes. Step 3. Place threshold on y for classification based on decision theory. Assume p1=0.5 . (Hint: Make use of the results obtained in the tutorial). In particular, show the steps in your computation of the following items: i. S1, S2, S, SB, w, Y1, Y2 in Step 1. ii. 1, 1, 2, 2 in Step 2. iii. The classification threshold obtained in Step 3. (Hint: Make use of the results obtained in the tutorial). (b) (20 marks) Write a Python function called LDA to verify your calculation in Part (a). The function should have a header: def LDA(X1, X2) where X1 and X2 are arranged in columns. In the function, codes should be written to (1) compute Item i, ii and iii in Part (a), (2) plot of all the data points with the projection vector superimposed and (3) f(y|Ck) for k = 1,2 and (4) f(Ck|y) for k = 1,2.

X1train=[23324432545328460065]X2train=[716915101311119171313914111511141012]Xtest=[40102.51012.5]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

How do VPN services differ from common carrier services?

Answered: 1 week ago

Question

Organize and support your main points

Answered: 1 week ago

Question

Move smoothly from point to point

Answered: 1 week ago

Question

Outlining Your Speech?

Answered: 1 week ago