Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DO PART B only Data used in Problems 1 and 2 X1train and X2train are training data points in Class 1 and 2, respectively. Xtest

DO PART B only

image text in transcribedimage text in transcribedimage text in transcribed

Data used in Problems 1 and 2 X1train and X2train are training data points in Class 1 and 2, respectively. Xtest are testing data points to be classified into Class 1 and 2 . In the following expression, two-dimensional data points are represented in columns: X1train=[23324432545328460065]X2train=[716915101311119171313914111511141012]Xtest=[40102.51012.5] Problem 1 (a) (20 marks) Use the Gaussian Discriminant Analysis method to come up with a mathematical description of the decision boundary used to classify Class 1 and 2 . Use the training data to train the model and determine the decision boundary. Then classify each of the test points based on the posterior probabilities f(C1x) and f(C2x). In your submission, show the steps in your computation of the following items. Note that all calculations in Part (a) should be done by hand: i. : The prior probability of Class 1 ; ii. 1,2 : The mean vectors of the two classes; iii. S1,S2,S : The covariance matrices of the two classes and the mean covariance matrix; iv. w and w0 in the decision boundary equation: wTx+w0=0. b) (20 marks) Write a Python function called GaussianDiscriminantAnalysis to verify your calculation in Part (a). The function header should have the following form: def Gaussiandiscriminantanalysis (X1, X2) where data points in X1 and X2 are arranged in columns. In the function, codes should be written to (1) compute Item i, ii, iii and iv in Part (a) and the decision boundary and (2) plot of all the training data points with the decision boundary superimposed. You are encouraged to use the matlabplotlib.pyplot library for plotting. The function should be saved as an individual file named GaussiandiscriminantAnalysis.py and the codes written to implement the function should be copied and pasted to your report

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

Database And Expert Systems Applications 22nd International Conference Dexa 2011 Toulouse France August/September 2011 Proceedings Part 1 Lncs 6860

Authors: Abdelkader Hameurlain ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2011th Edition

3642230873, 978-3642230875

More Books

Students also viewed these Databases questions

Question

Why is exchange-rate stability important?

Answered: 1 week ago

Question

Define Conventional Marketing.

Answered: 1 week ago

Question

Define Synchro Marketing.

Answered: 1 week ago

Question

Define marketing concepts.

Answered: 1 week ago

Question

1 what does yellow colour on the map represent?

Answered: 1 week ago