EE4108 Machine Learning Assignment

Assignment Help Python Programming
Reference no: EM132571106

EE4108 Machine Learning - Aston University

Problem 1:

Consider a two-dimensional class problem that involves two classes ω1 (y1 = 1) and ω2 (y2 = 0). Each one of them is modelled by a mixture of equiprobable Gaussian distributions. Specifically, the means of the Gaussians associated with ω1 are [ 5, 5]T and [5, 5]T , while the means of the Gaussians associated with ω2 are [ 5. 5]T . [0.0]T and [5, 5]T . The covariances of all Gaussians are σ2I where σ2 = 2.

i. Using of the mixt model python function that you will be given during one of the lab sessions, generate and plot a data set X1 (training set) containing 100 points from ω1 (50 points from each associated Gaussian) and 150 points from ω2 (again 50 points from each associated Gaussian). In the same way, generate an additional set X2 (test set). Plot the generated sets in different figures, designating the different points of each class.

ii. Based on X1, create a two-layer neural network with two nodes in the hidden layer hav- ing the hyperbolic tangent as activation function and a single output node with sigmoid activation function 1. Perform training with the standard back-propagation algorithm for 10000 iterations and step-size equal to 0.5. Compute the calculated costs for every 100 iterations for the training and the test sets, based on X1 and X2, respectively. Also, make a scatter plot the test points, and plot the decision areas formed by the network in a single figure.

iii. Repeat step (ii) for step-size equal to 0.001 and comment on the results.

iv.Repeat step (ii) for k = 1, 4, 20 hidden layer nodes and comment on the results.

Problem 2:

In this problem we will examine the prediction power of the kernel ridge regression in the presence of noise and outliers. We consider original data were samples are generated from a music recording, such as of the Blade Runner by Vangelis Papathanasiou. Read the audio file using the read function from SoundFile 2 package and take 1000 data samples (starting from the 100,000th sample). Then add white gaussian noise at a 15 dB level and randomly "hit" 50 of the data samples yn with outliers (yn ± 0.8ymax, i.e. set the outlier induced deviation is 80% of the maximum value of all the data samples).

i. Find the reconstructed data samples using the kernel ridge regression method (see eq. 6.9 of PRML textbook). Employ the Gaussian kernel with σ = 0.004 and set λ = 0.0001.

Plot the fitted curve of the reconstructed samples together with the data used for training.

ii.Repeat the first step (i) using λ = 10-6, 10-5, 0.0005, 0.001, 0.01 and 0.05

iii.Repeat the first step (i) using σ = 0.001, 0.003, 0.008 and 0.05

iv.Comment on the above results

Problem 3

In this problem we will examine the performance of a SVM in the context of a two-class two- dimensional classification task. The data set comprises N = 150 points, xn = [xn,1, xn,2]T where n = 1, 2, ..., N , uniformly distributed in [-5, 5] × [-5, 5]. For each point compute:

yn = 0.05x3n,1 + 0.05x2n,1 + 0.05xn,1 + 0.05 + η

where η denotes zero-mean Gaussian noise of variance σ2n = 4. Then, if xn,2 ≥ yn assign it to ω1, and if xn,2 < yn assign it to class ω2.

i. Plot the points [ xn,1, xn,2] using different colors for each class.

ii. Obtain the SVM classifier from Ski-learn or any other related Python package. Use the Gaussian kernel with σ = 20 and set C = 1. Plot the classifier and the margin (for the latter you can employ the contour function from Matplotlib package 3). Moreover, find the support vectors (i.e. the points with nonzero Lagrange multipliers that contribute to the expansion of the classifier) and plot them as circled points.

iii. Repeat the ii-step using C = 0.5, 0.1 and 0.005. Repeat again using C = 5, 10, 50 and 100

iv. Comment on the results

Problem 4

412_figure.jpg

Consider the decision feedback equalizer depicted in the above figure.

i. Generate a sequence of 1000 random ±1 samples, representing a transmitted BPSK signal (i.e. sn). Direct this sequence into a linear channel with impulse response h = [0.04, -0.05, 0.07, -0.21, 0.72, 0.36, 0.21, 0.03, 0.07]T and add to the output 11dB white Gaussian noise using the given py awgn function. Denote the output as un.

ii. Design the adaptive decision feedback equalizer (DFE) using L = 21, l = 10, and µ = 0.025 following the training mode only. Perform a set of 500 experiments feeding the DFE with different random sequences from the one described in step (i). Plot the mean square error (averaged over the 500 experiments). Observe that around n = 250 the algorithm achieves convergence.

iii. Design the adaptive decision feedback equalizer using the parameters of step-(ii). Feed the equalizer with a series of 10,000 random values generated as in step-(i). After the 250th data sample, change the DFE to decision-directed mode. Count the percentage of the errors performed by the equalizer from the 251th to the 10,000th sample.

iv. Repeat steps (i) and (ii) changing the level of the white Gaussian noise added to the BPSK values to 15, 12, 10 dB. Comment on the results.

Attachment:- Machine Learning.rar

Reference no: EM132571106

Questions Cloud

What will the accumulated depreciation expense for purchse : What will the accumulated depreciation expense for this purchase (exclude all other plant and equipment) be after its second year of use?
What were the researcher findings in given problem : The purpose of this assignment is to become familiar with published research, research designs, and methodologies. For the assignment, you will select one.
Determine the book value on January : Using straight-line depreciation, determine the book value on January 1, 2004 and the revised depreciation for 2004
What are causes of change in equity : What are causes of change in equity? Last year the Digby company increased their equity. In 2019 their equity was $49,468. Last year (2020) it increased
EE4108 Machine Learning Assignment : EE4108 Machine Learning Assignment Help and Solution, Aston University - Assessment Writing Service - Plot the fitted curve of the reconstructed samples
Prepare the journal entry to record the exchange : Prepare the journal entry to record the exchange under the assumption that a $5,000 trade-in allowance was received and the balance was paid in cash
Describe idea of effective learning experience : Describe your idea of an effective learning experience? Recall a time when learning or writing seemed difficult.
What are the goals for the product : Include intro, a currently emerging healthcare technology system, goals for the product, data supporting the product, healthcare settings (including education).
How the information held in financial management systems : Explaining how the information held in financial management systems contribute to ongoing business performance and business planning.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd