需要关于此作业的帮助?欢迎联系我

Homework 2

Introduction In this homework we first take a closer look at feature maps induced by kernels. We then explore a creative use of the gradient descent method introduced in homework 1. We will show that gradient descent techniques can be used to construct combinations of models from a base set of models such that the combination can outperform any single base model.

Points Allocation There are a total of 28 marks.

What to Submit

  • A single PDF file which contains solutions to each question. For each question, provide your solution in the form of text and requested plots. For some questions you will be requested to provide screenshots of code used to generate your answer — only include these when they are explicitly asked for..py file(s) containing all code you used for the project, which should be provided in a separate .zip file. This code must match the code provided in the report.
  • You may be deducted points for not following these instructions.
  • You may be deducted points for poorly presented/formatted work. Please be neat and make your solutions clear. Start each question on a new page if necessary.
  • You cannot submit a Jupyter notebook; this will receive a mark of zero. This does not stop you from developing your code in a notebook and then copying it into a .py file though, or using a tool such as nbconvert or similar.
  • We will set up a Moodle forum for questions about this homework. Please read the existing questions before posting new questions. Please do some basic research online before posting questions. Please only post clarification questions. Any questions deemed to be fishing for answers will be ignored and/or deleted.
  • Please check Moodle announcements for updates to this spec. It is your responsibility to check for announcements about the spec.
  • Please complete your homework on your own, do not discuss your solution with other people in the course. General discussion of the problems is fine, but you must write out your own solution and acknowledge if you discussed any of the problems in your submission (including their name(s) and zID).
  • As usual, we monitor all online forums such as Chegg, StackExchange, etc. Posting homework questions on these site is equivalent to plagiarism and will result in a case of academic misconduct.
  • You may not use SymPy or any other symbolic programming toolkits to answer the derivation questions. This will result in an automatic grade of zero for the relevant question. You must do the derivations manually.

When and Where to Submit

  • Due date: Week 7, Monday July 10th, 2023 by 5pm. Please note that the forum will not be actively monitored on weekends.
  • Late submissions will incur a penalty of 5% per day from the maximum achievable grade. For example, if you achieve a grade of 80/100 but you submitted 3 days late, then your final grade will be 80 - 3× 5 = 65. Submissions that are more than 5 days late will receive a mark of zero.
  • Submission must be made on Moodle, no exceptions.

Question 1. Gradient Descent for Learning Combinations of Models

In this question, we discuss and implement a gradient descent based algorithm for learning combinations of models, which are generally termed ’ensemble models’. The gradient descent idea is a very powerful one that has been used in a large number of creative ways in machine learning beyond direct minimization of loss functions. The Gradient-Combination (GC) algorithm can be described as follows: Let F be a set of base learning algorithms1. The idea is to combine the base learners in F in an optimal way to end up with a good learning algorithm. Let `(y, y?) be a loss function, where y is the target, and y? is the predicted value.2 Suppose we have data (xi, yi) for i = 1, . . . , n, which we collect into a single data set D0. We then set the number of desired base learners to T and proceed as follows: (I) Initialize f0(x) = 0 (i.e. f0 is the zero function.)

more ...