• Home
  • The University of British Columbia
  • Dynamic and waves
  • Midterm Exam CPSC 340

Midterm Exam CPSC 340

UBC CPSC 340 2017W1 MIDTERM EXAM TIME: 55 minutes Name: Student number: CWL username: Signature: By signing above, I hereby acknowledge that I did not / will not cheat on this exam. · Do not open the exam until you are directed to do so. . Once you open the exam, make sure that it contains this cover page plus 9 pages of exam questions. · One letter-size sheet (both sides) of notes is allowed. No other material or accessories may be used. . You may use either pen or pencil, but exams written in pencil may not be eligible for regrading. . Please be prepared to present, upon request, a student card for identification. . If you need more space, use the blank page at the end of the exam, and clearly indicate that your work continues there. . Most questions require a short answer. Work efficiently and avoid writing lengthy answers. . Unless otherwise stated, n refers to the number of training examples and d is the number of features. · If anything is unclear or seems ambiguous, state your assumptions. . Please look up occassionally in case there are clarifications writte on the projection. · You are weclome to (quietly) leave early if you finish in under 50 minutes, but please do not leave in the last 5 minutes as it is very distracting to those who want to work up to the last minute. Question: 1 2 3 4 5 Total 45 Points: 24 5 4 5 7 Score: GOOD LUCK !! Midterm Exam CPSC 340 Question 1. (24 points) Answer the questions below. Be concise: avoid spending valuable time on lengthy answers. 2 pts (a) What does xij refer to in the notation we've been using in class? (b) Why shouldn't you use the training error to choose the value of k in k-nearest neighbours? (c) What is the difference between a validation error and the test error? 2 pts 2 pts Page 1 of 9 Midterm Exam CPSC 340 2 pts 2 pts (d) What is the effect of the number of features d that our model uses on the two parts of the fundamental trade-off? (e) Explain why a random forest based on random trees of depth 10 could be viewed as a parametric classifier. Explain why or why not it would be a parametric classifier if we set the depth to co in our code? (f) What is a disadvantage of using scatterplots as a method for outlier detection? 2 pts Page 2 of 9