Homework #1 RELEASE DATE: 09/26/2013 DUE DATE: 10/14/2013, BEFORE NOON QUESTIONS ABOUT HOMEWORK MATERIALS ARE WELCOMED ON THE FORUM.

Similar documents
Homework #3 RELEASE DATE: 10/28/2013 DUE DATE: extended to 11/18/2013, BEFORE NOON QUESTIONS ABOUT HOMEWORK MATERIALS ARE WELCOMED ON THE FORUM.

Midterm: CS 6375 Spring 2015 Solutions

Prelim 1 (10 8)!8! = 10 9 = 45. (b) How many ways can it be done if the first three questions are required? 2 = 21

Supervised Machine Learning (Spring 2014) Homework 2, sample solutions

Learning From Data Lecture 2 The Perceptron

MATH 137 : Calculus 1 for Honours Mathematics. Online Assignment #2. Introduction to Sequences

Machine Learning Basics Lecture 3: Perceptron. Princeton University COS 495 Instructor: Yingyu Liang

Warm up: risk prediction with logistic regression

Use the Rational Zero Theorem to list all the possible rational zeros of the following polynomials. (1-2) 4 3 2

PRIMES Math Problem Set

MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October,

Machine Learning Foundations

Machine Learning Foundations

Homework # 3. Due Monday, October 22, 2018, at 2:00 PM PDT

Welcome to MAT 137! Course website:

Lynch, October 2016 Page 1 of 5. Math 150, Fall 2016 Exam 2 Form A Multiple Choice Sections 3A-5A

Quinsigamond Community College School of Math and Science

1 Machine Learning Concepts (16 points)

CHEM 1420: Physical Chemistry 2 Thermodynamics, Statistical Mechanics, and Kinetics

Midterm Exam Information Theory Fall Midterm Exam. Time: 09:10 12:10 11/23, 2016

The Perceptron. Volker Tresp Summer 2016

You have 3 hours to complete the exam. Some questions are harder than others, so don t spend too long on any one question.

Advanced Engineering Mathematics Course Number: Math Spring, 2016

CHEMISTRY 2H Honors General Chemistry I Fall 2013 Course Syllabus

Lecture 8: Conditional probability I: definition, independence, the tree method, sampling, chain rule for independent events

IMBALANCED DATA. Phishing. Admin 9/30/13. Assignment 3: - how did it go? - do the experiments help? Assignment 4. Course feedback

1 [15 points] Frequent Itemsets Generation With Map-Reduce

outline Nonlinear transformation Error measures Noisy targets Preambles to the theory

Be able to define the following terms and answer basic questions about them:

Field Trips: We will have two during class hours field trips and one day long Saturday field trip.

SYLLABUS SEFS 540 / ESRM 490 B Optimization Techniques for Natural Resources Spring 2017

Math 20 Spring Discrete Probability. Midterm Exam

College Algebra: Midterm Review

Parts 3-6 are EXAMPLES for cse634


Machine Learning Basics Lecture 4: SVM I. Princeton University COS 495 Instructor: Yingyu Liang

1,1 1,2 1,3 1,4 1,5 1,6 2,1 2,2 2,3 2,4 2,5 2,6 3,1 3,2 3,3 3,4 3,5 3,6 4,1 4,2 4,3 4,4 4,5 4,6 5,1 5,2 5,3 5,4 5,5 5,6 6,1 6,2 6,3 6,4 6,5 6,6

General Physics (PHY 2130)

Education Council Proposal: Re-articulation and Prerequisite changes for Advanced Algebraic Mathematics (MATH 045)

COMS F18 Homework 3 (due October 29, 2018)

COURSE SYLLABUS Math/Science Department PHY 104 Physical Science Spring 2016

Administration. CSCI567 Machine Learning (Fall 2018) Outline. Outline. HW5 is available, due on 11/18. Practice final will also be available soon.

PELLISSIPPI STATE COMMUNITY COLLEGE MASTER SYLLABUS

CS534 Machine Learning - Spring Final Exam

Midterm 2 V1. Introduction to Artificial Intelligence. CS 188 Spring 2015

Required Textbook. Grade Determined by

10601 Machine Learning Assignment 7: Graphical Models

Page Points Score Total: 100

FINAL: CS 6375 (Machine Learning) Fall 2014

Astronomy Course Syllabus

Introduction to AI Learning Bayesian networks. Vibhav Gogate

Midterm. You may use a calculator, but not any device that can access the Internet or store large amounts of data.

CSE 417T: Introduction to Machine Learning. Lecture 11: Review. Henry Chai 10/02/18

9.1 HW (3+3+8 points) (Knapsack decision problem NP-complete)

Intermediate Math Circles November 8, 2017 Probability II

7.4 DO (uniqueness of minimum-cost spanning tree) Prove: if all edge weights are distinct then the minimum-cost spanning tree is unique.

Today s Menu. Administrativia Two Problems Cutting a Pizza Lighting Rooms

HKUST. MATH1013 Calculus IB. Directions:

Lynch 2017 Page 1 of 5. Math 150, Fall 2017 Exam 2 Form A Multiple Choice

1 Java Night Countdown (30%)

HOMEWORK 4: SVMS AND KERNELS

MATH 137 : Calculus 1 for Honours Mathematics Instructor: Barbara Forrest Self Check #1: Sequences and Convergence

Object Oriented Software Design (NTU, Class Even, Spring 2009) Final Examination Problem Sheet TIME: 06/16/2009, 14:20 17:20

2.4 Investigating Symmetry

Binary Classification / Perceptron

Math 116 Second Midterm November 13, 2017

This course is based on notes from a variety of textbooks, National Weather Service Manuals, and online modules (e.g.,

MATH 18.01, FALL PROBLEM SET # 3A

Be able to define the following terms and answer basic questions about them:

Lecture 11 - Basic Number Theory.

Midterm Exam 1 Solution

MATH 18.01, FALL PROBLEM SET # 2

University of Alaska Fairbanks Chemistry 103: Basic General Chemistry Course Syllabus

Spring 2018 Math Week Week 1 Task List

Physics 141 Course Information

STAT 311 Practice Exam 2 Key Spring 2016 INSTRUCTIONS

CS 598 Statistical Reinforcement Learning. Nan Jiang

i=1 Pr(X 1 = i X 2 = i). Notice each toss is independent and identical, so we can write = 1/6

Physics 8 Monday, September 26, 2011

Discrete Mathematics and Probability Theory Fall 2017 Ramchandran and Rao Midterm 2 Solutions

Thank you for your purchase!

CS540 ANSWER SHEET

The Perceptron Algorithm 1

POWER ALGEBRA NOTES: QUICK & EASY

Classification with Perceptrons. Reading:

Math Released Item Algebra 1. System of Inequalities VF648815

Guidelines for Graphing Calculator Use at the Commencement Level

Physics 141 Course Information

More about the Perceptron

Homework 1 Solutions Probability, Maximum Likelihood Estimation (MLE), Bayes Rule, knn

The Perceptron. Volker Tresp Summer 2014

HIRES 2017 Syllabus. Instructors:

Assignment 1: Probabilistic Reasoning, Maximum Likelihood, Classification

JEFFERSON COLLEGE COURSE SYLLABUS MTH 110 INTRODUCTORY ALGEBRA. 3 Credit Hours. Prepared by: Skyler Ross & Connie Kuchar September 2014

Introduction to Course

Syllabus: CHEM 4610/5560 Advanced Inorganic Chemistry I Fall Semester credit hours; lecture only

ORIE 4741: Learning with Big Messy Data. Generalization

ST. JAMES HIGH SCHOOL. Chemistry Syllabus. Course and Contact Information. Course Description

Machine Learning: Homework Assignment 2 Solutions

CIS519: Applied Machine Learning Fall Homework 5. Due: December 10 th, 2018, 11:59 PM

Transcription:

Homework #1 REEASE DATE: 09/6/013 DUE DATE: 10/14/013, BEFORE NOON QUESTIONS ABOUT HOMEWORK MATERIAS ARE WECOMED ON THE FORUM. Unless granted by the instructor in advance, you must turn in a printed/written copy of your solutions (without the source code) for all problems. For problems marked with (*), please follow the guidelines on the course website and upload your source code to designated places. Any form of cheating, lying, or plagiarism will not be tolerated. Students can get zero scores and/or fail the class and/or be kicked out of school and/or receive other punishments for those kinds of misconducts. Discussions on course materials and homework solutions are encouraged. But you should write the final solutions alone and understand them fully. Books, notes, and Internet resources can be consulted, but not copied from. Since everyone needs to write the final solutions alone, there is absolutely no need to lend your homework solutions and/or source codes to your classmates at any time. In order to maximize the level of fairness in this class, lending and borrowing homework solutions are both regarded as dishonest behaviors and will be punished according to the honesty policy. You should write your solutions in English or Chinese with the common math notations introduced in class or in the problems. We do not accept solutions written in any other languages. There are three kinds of regular problems. multiple-choice question (MCQ): There are several choices and only one of them is correct. You should choose one and only one. multiple-response question (MRQ): There are several choices and none, some, or all of them are correct. You should write down every choice that you think to be correct. blank-filling question (BFQ): You should write down the answer that we ask you to fill. Some problems also come with (+...) that contains additional todo items. If there are big bonus questions (BBQ), please simply follow the problem guideline to write down your solution, if you choose to tackle them. This homework set comes with 00 points and 0 bonus points. In general, every homework set of ours would come with a full credit of 00 points, with some possible bonus points. 1. (MCQ) Which of the following problems are best suited for machine learning? (i) Classifying numbers into primes and non-primes (ii) Detecting potential fraud in credit card charges (iii) Determining the time it would take a falling object to hit the ground (iv) Determining the optimal cycle for traffic lights in a busy intersection (v) Determining the age at which a particular medical test is recommended [a] (ii), (iv), and (v) [b] (i) and (ii) [c] (i), (ii), (iii), and (iv) [d] (iii) and (iv) 1 of 6

For Problems -5, identify the best type of learning that can be used to solve each task below.. (MCQ) In an online bookstore, gradually improve the recommendation of books to each user from the historical user feedback 3. (MCQ) Finding unusual purchasing behavior of a credit card owner 4. (MCQ) earning to play music 5. (MCQ) Deciding the maximum allowed debt for each bank customer Problem 6-8 are about Off-Training-Set error. et X = {x 1, x,..., x N, x N+1,..., x N+ } and Y = { 1, +1} (binary classification). Here the set of { } N { } training examples is D = (x n, y n ), where y n Y, and the set of test inputs is x N+l The l=1. n=1 Off-Training-Set error (OT S) with respect to an underlying target f and a hypothesis g is E OT S (g, f) = 1 g(x N+l ) f(x N+l ). l=1 { +1, for x = xk and k is odd and 1 k N + 6. (MCQ) Consider f(x) = +1 for all x and g(x) = 1, otherwise E OT S (g, f) =?. 1 N+ [a] ( N ) 1 N+ [b] ( N ) of 6

1 N+ [c] ( N ) 1 N+ [d] ( N ) (+ proof of your choice) 7. (MCQ) We say that a target function f can generate D in a noiseless setting if f(x n ) = y n for all (x n, y n ) D. For all possible f : X Y, how many of them can generate D in a noiseless setting? [a] 1 [b] N [c] [d] N+ (+ proof of your choice) 8. (MRQ) Following Problem 7, select all the correct statements for a fixed g and a given integer k between 0 and. [a] the number of f that satisfies E OT S (g, f) = k is ( ) k [b] the number of f that satisfies E OT S (g, f) = k is ( ) +N k [c] if all those f satisfying E OT S (g, f) = k are equally likely in probability, the expected OTS E f {E OT S (g, f)} over those f is k. [d] if all those f satisfying E OT S (g, f) = k are equally likely in probability, the expected OTS E f {E OT S (g, f)} over those f is 1. (+ proof of your choice) For Problems 9-1, consider the bin model introduced in class. Consider a bin with infinitely many marbles, and let µ be the fraction of orange marbles in the bin, and ν is the fraction of orange marbles in a sample of 10 marbles. 9. (MCQ) If µ = 0.5, what is the probability of ν = µ? [a] 0.4 [b] 0.39 [c] 0.56 [d] 0.90 10. (MCQ) If µ = 0.9, what is the probability of ν = µ? [a] 0.4 [b] 0.39 [c] 0.56 [d] 0.90 11. (MCQ) If µ = 0.9, what is the probability of ν 0.1? [a] 0.1 10 9 [b] 1.0 10 9 [c] 8.5 10 9 [d] 9.1 10 9 3 of 6

1. (MCQ) If µ = 0.9, what is the bound given by Hoeffding s Inequality for the probability of ν 0.1? [a] 5.5 10 4 [b] 5.5 10 6 [c] 5.5 10 8 [d] 5.5 10 10 Problems 13-14 illustrate what happens with multiple bins. Consider four kinds of dice in a bag, with the same (super large) quantity for each kind. A: all even numbers are colored orange, all odd numbers are colored green B: all even numbers are colored green, all odd numbers are colored orange C: all small (1-3) are colored orange, all large numbers (4-6) are colored green D: all small (1-3) are colored green, all large numbers (4-6) are colored orange 13. (MCQ) If we pick 5 dice from the bag (without further throwing), what is the probability that we get five orange 1 s on the dice? [a] 1 [b] 8 [c] 31 [d] 46 14. (MCQ) If we pick 5 dice from the bag (without further throwing), what is the probability that we get at least one number that is purely colored orange (i.e. five orange) on the dice? [a] 1 [b] 8 [c] 31 [d] 46 For Problems 15-0, you will play with PA and pocket algorithm. First, we use an artificial data set to study PA. The data set is in http://www.csie.ntu.edu.tw/~htlin/course/ml13fall/hw1/hw1_15_train.dat Each line of the data set contains one (x n, y n ) with x n R 4. The first 4 numbers of the line contains the components of x n orderly, the last number is y n. 15. (BFQ, *) Implement a version of PA by visiting examples in the naïve cycle using the order of examples in the data set. Run the algorithm on the data set. What is the number of updates before the algorithm halts? 4 of 6

16. (BFQ, *) Implement a version of PA by visiting examples in fixed, pre-determined random cycles throughout the algorithm. Equivalently, you can generate a random cycle to permute your examples before running your PA in Problem 15. Run the randomized algorithm on the data set. Please repeat your experiment for 000 times, each with a different random seed. What is the average number of updates before the algorithm halts? 17. (BFQ, *) Implement a version of PA by visiting examples in fixed, pre-determined random cycles throughout the algorithm, while changing the update rule to be w t+1 w t + ηy n(t) x n(t) with η = 0.5. Note that your PA in the previous problem corresponds to η = 1. Please repeat your experiment for 000 times, each with a different random seed. What is the average number of updates before the algorithm halts? Next, we play with the pocket algorithm. Modify your PA in Problem 16 to visit examples purely randomly (without pre-determined cycles), and then add the pocket steps to the algorithm. We will use http://www.csie.ntu.edu.tw/~htlin/course/ml13fall/hw1/hw1_18_train.dat as the training data set D, and http://www.csie.ntu.edu.tw/~htlin/course/ml13fall/hw1/hw1_18_test.dat as the test set for verifying the g returned by your algorithm (see lecture 4 about verifying). The sets are of the same format as the previous one. 18. (BFQ, *) Run the pocket algorithm with a total of 50 PA updates on D, and verify the performance of w pocket using the test set. Please repeat your experiment for 000 times, each with a different random seed. What is the average error rate on the test set? 19. (BFQ, *) Modify your algorithm in Problem 18 to return w 50 (the PA vector after 50 PA updates) instead of ŵ (the pocket vector) after 50 PA updates. Run the modified algorithm on D, and verify the performance using the test set. Please repeat your experiment for 000 times, each with a different random seed. What is the average error rate on the test set? 0. (BFQ, *) Modify your algorithm in Problem 18 to run for 100 PA updates instead of 50, and verify the performance of w pocket using the test set. Please repeat your experiment for 000 times, each with a different random seed. What is the average error rate on the test set? Bonus: Another Perceptron earning Algorithm The original perceptron learning algorithm does not take the seriousness of the prediction error into account. That is, regardless of whether y n(t) w T t x n(t) is very negative or just slightly negative, the update rule is always w t+1 w t + y n(t) x n(t). Dr. earn decides to use a different update rule. Namely, if y n(t) sign(w T t x n(t) ), the doctor will use w t+1 w t + y n(t) x n(t) yn(t) wt T x n(t) x n(t) + 1. 1. (BBQ, 10 points) Prove that with the new update rule, y n(t) w T t+1x n(t) > 0. That is, w t+1 always classifies (x n(t), y n(t) ) correctly.. (BBQ, 10 points) When the data set is linear separable, does this new update rule still ensure halting with a perfect line? Why or why not? 5 of 6

Answer guidelines. First, please write down your name and school ID number. Name: School ID: Then, fill in your answers for MCQ, MRQ and BFQ in the table below. 1 3 4 5 6 7 8 9 10 11 1 13 14 15 16 17 18 19 0 astly, please write down your solution to those (+...) parts and bonus problems, using as many additional pages as you want. Each problem is of 10 points. For Problem with (+...), the answer in the table is of 3 score points, and the (+...) part is of 7 score points. If your solution to the (+...) part is clearly different from your answer in the table, it is regarded as a suspicious violation of the class policy (plagiarism) and the TAs can deduct some more points based on the violation. For Problem without (+...), the problem is of 10 points by itself and the TAs can decide to give you partial credit or not as long as it is fair to the whole class. 6 of 6