Machine Learning Assignment - Dual Representation

Assignment Help Computer Engineering
Reference no: EM133142433

Machine Learning Assignment -

1. Least Squares and Double Descent Phenomenon (17P)

The goal in this assignment is to learn about linear least squares regression and the double descent phenomenon, shown in Figure 1. In the classical learning setting, the U-shaped risk curve can be observed indicating a bad test error while the training error is very low, i.e. the model does not generalize well to new data. However, a highly over-parameterized model with a large capacity allows the test error to go down again in a second descent ("double descent"), which can sometimes be observed in over-parametrized deep learning settings.

Tasks -

1. Rewrite eq. (2) in pure matrix/vector notation, such that there are no sums left in the final expression. Use ? = φ(x) for the feature transform which can be computed prior to the optimization. Additionally, state the matrix/vector dimensions of all occurring variables.

2. Analytically derive the optimal parameters w* from eq. (2).

3. Give an analytic expression to compute predictions y^ given w*.

This can also be interpreted as a small feed-forward neural network with one hidden layer for an input x ∈ Rd and output y^ ∈ R. Draw a simple schematic of this neural network and include exemplary labels of its neurons and connections.

4. Create a training dataset comprised of input data x = {x1, ..., xN} and corresponding targets y = {y1, ..., yN} with N = 200, d = 5 and σ = 2 according to eq. (1).

In the same manner, create a test dataset with Nt = 50 for both test input data and test targets.

5. Generate M = 50 d-dimensional random feature vectors v = {v1, ..., vM} on the unit sphere.

6. Implement the computation of w* from the training data using a QR decomposition. Further, compute the mean squared error denoted in eq. (4) for both the training and test data based on the optimal parameters w*.

7. Use λ = 1 x 10-8 to reproduce the double descent behaviour. Run this experiment for a number of feature vectors M = {10k + 1 | k ∈ {0, 1, 2, ..., 60}} and save the training and test loss in each run. For each M, do the experiment r = 5 times to obtain averaged scores.

8. Plot both the averaged (over the r = 5 runs) train and test errors depending on the number of feature vectors M in the same plot. Include the standard deviation of each setting in addition to the averaged loss. Give an interpretation of your results.

9. Repeat the same experiment for λ = {1 x 10-5, 1 x 10-3} and explain the influence of λ. Include the resulting curves containing train and test error for each λ in two additional subplots.

2. Dual Representation (8P)

The linear least squares problem from Task 1 can be reformulated in its dual representation, where an equivalent solution can be obtained.

Tasks -

1. Analytically compute the optimal parameters a* from eq. (5). State the dimension of the resulting matrix that has to be inverted in the process and compare them those required in Task 1. When is it favourable to use the primal and when the dual solution?

2. Give an analytic expression to compute predictions y^ given a* using eq. (7), such that you only rely on K and do not need to compute the features ? explicitely.

3. For the train data x compute the kernel matrix as given in eq. (6). Repeat the same process for the test data, ensuring that the resulting kernel matrices are of dimensionality RNxN and RN_txN, respectively.

4. Implement the computation of a* and report the mean squared error on the train and test data, using λ = 1 x 10-8.

5. Use exactly the same datasets as in Task 1. For the train data x, compare the kernel K and ??T . For different numbers of features M = {10, 200, 800}, evaluate both terms and plot the row n = 10 from both resulting N x N matrices in one plot. Describe the influence of M. Compute for each M the mean absolute error between both 1D arrays, i.e. MAE(Kn, (??T)n) = 1/N i=1ΣN|(Kn)i - ((??T)n)i|.

Compare train and test errors obtained with the primal solution for each setting of M with the dual solution.

Attachment:- Machine Learning Assignment File.rar

Reference no: EM133142433

Questions Cloud

Hidden backer monetary strength : Further, debentures might convey credit hazard and default risk +5 As expressed before, debentures are just pretty much as secure as the hidden backer's monetar
Treat generalized anxiety disorder : Discuss the pharmacokinetics and pharmacodynamics related to anxiolytic medications used to treat Generalized Anxiety Disorder (GAD).
Initial assessment methods : 1) Is it unethical for an employer to use a selection measure that has high empirical validity but lacks content validity? Explain.
Professional development goals : Explain three strategies for including academic activities and accomplishments into your professional development goals.
Machine Learning Assignment - Dual Representation : Machine Learning Assignment - For the train data x compute the kernel matrix as given in eq. (6). Repeat the same process for the test data
Iron triangle of health care : The concept of cost, access, and quality has often been referred to as the iron triangle of health care.
Current and future applications of AI : We have examined a lot of the current and future applications of AI. Discuss what are the positive aspects of applying AI to your topic.
Focusing on treating individuals versus population : Assess the benefits and drawbacks associated with only focusing on treating individuals versus a population.
How does the structured interview guide improve selection : How does the structured interview guide improve selection? What are some of the questions and issues to avoid in the interview?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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