machine learning

© All Rights Reserved

14K views

machine learning

© All Rights Reserved

- Machine Learning Coursera All Exercies
- Linear Regression Review
- Linear Regression With One Variable
- Quiz Feedback _ Coursera
- A Short Course on PROBABILITY and SAMPLING
- Multiple Regression
- ML Week 3 Logistic Regression
- ML Exercise 1
- Partial Derivatives
- Boolean Algebra
- Octave Tutorial Q 4
- 1 Linear Regression With One Variable
- File Handling Assignments
- Quiz Feedback _ Coursera
- ML-notes
- Ng Machine Learning Notes
- Linear Regression with One Variable.docx
- apostila
- 9. XV. Anomaly Detection
- Coursera Introduction to Marketing Quizzes

You are on page 1of 3

Consider the problem of predicting how well a student does in her second year of

college/university, given how well they did in their frst year. Specifcally, let x be equal to

the number of "A" grades (including A-. A and A+ grades) that a student receives in their

frst year of college (freshmen year). We would like to predict the value of y, which we

defne as the number of "A" grades they get in their second year (sophomore year).

Questions 1 through 4 will use the following training set of a small sample of diferent

students' performances. Here each row is one training example. Recall that in linear

regression, our hypothesis is h(x)=0+1x, and we use m to denote the number of

training examples.

x y

3 4

2 1

4 3

0 1

For the training set given above, what is the value of m? In the box below, please enter

your answer (which should be a number between 0 and 10).

Answer for Question 1

You entered:

Your Answer ScoreExplanation

4 Correct 1.00

Total 1.00 / 1.00

Question Explanation

m is the number of training examples. In this example, we have m=4 examples.

Question 2

For this question, continue to assume that we are using the training set given above.

Recall our defnition of the cost function was J(0,1)=12mmi=1(h(x(i))y(i))2. What

is J(0,1)? In the box below, please enter your answer (use decimals instead of fractions

if necessary, e.g., 1.5).

Answer for Question 2

You entered:

Your Answer ScoreExplanation

0.5 Correct 1.00

Total 1.00 / 1.00

Question Explanation

When 0=0 and 1=1, we have h(x)=0+1x=x. So, J(0,1)=12mi=1m(h(x(i))

y(i))2=124((1)2+(1)2+(1)2+(1)2)=48=0.5

Question 3

Suppose we set 0=1,1=2. What is h(6)?

Answer for Question 3

You entered:

Your Answer ScoreExplanation

11 Correct 1.00

Total 1.00 / 1.00

Question Explanation

Setting x=6, we have h(x)=0+1x=1+26=11

Question 4

Let f be some function so that f(0,1) outputs a number. For this problem, f is some

arbitrary/unknown smooth function (not necessarily the cost function of linear

regression, so f may have local optima). Suppose we use gradient descent to try to

minimize f(0,1) as a function of 0 and 1. Which of the following statements are

true? (Check all that apply.)

Your Answer ScoreExplanation

Even if the learning rate is very large, every iteration of gradient descent will decrease

the value of f(0,1). Correct 0.25 If the learning rate is too large, one

step of gradient descent can actually vastly "overshoot", and actual increase the value of

f(0,1).

If the frst few iterations of gradient descent cause f(0,1) to increase rather than

decrease, then the most likely cause is that we have set the learning rate to too large

a value. Correct 0.25 If alpha were small enough, then gradient descent

should always successfully take a tiny small downhill and decrease f(\theta_0,\theta_1)

at least a little bit. If gradient descent instead increases the objective value, that means

alpha is too large (or you have a bug in your code!).

No matter how 0 and 1 are initialized, so long as is sufciently small, we can safely

expect gradient descent to converge to the same solution. Correct 0.25 This is

not true, because depending on the initial condition, gradient descent may end up at

diferent local optima.

If 0 and 1 are initialized at a local minimum, the one iteration will not change their

values. Correct 0.25 At a local minimum, the derivative (gradient) is zero,

so gradient descent will not change the parameters.

Total 1.00 / 1.00

Question 5

Suppose that for some linear regression problem (say, predicting housing prices as in

the lecture), we have some training set, and for our training set we managed to fnd

some 0, 1 such that J(0,1)=0. Which of the statements below must then be true?

(Check all that apply.)

Your Answer ScoreExplanation

This is not possible: By the defnition of J(0,1), it is not possible for there to exist 0

and 1 so that J(0,1)=0Correct 0.25 If all of our training examples lie

perfectly on a line, then J(0,1)=0 is possible.

For these values of 0 and 1 that satisfy J(0,1)=0, we have that h(x(i))=y(i) for

every training example (x(i),y(i)) Correct 0.25 J(0,1)=0, that means the line

defned by the equation "y=0+1x" perfectly fts all of our data.

We can perfectly predict the value of y even for new examples that we have not yet

seen. (e.g., we can perfectly predict prices of even new houses that we have not yet

seen.)Correct 0.25 Even though we can ft our training set perfectly, this does

not mean that we'll always make perfect predictions on houses in the future/on houses

that we have not yet seen.

For this to be true, we must have y(i)=0 for every value of i=1,2,,m. Correct

0.25 So long as all of our training examples lie on a straight line, we will be able

to fnd 0 and 1 so that J(0,1)=0. It is not necessary that y(i)=0 for all of our

examples.

Total 1.00 / 1.00

- Machine Learning Coursera All ExerciesUploaded byshrikedpill
- Linear Regression ReviewUploaded byalex_az
- Linear Regression With One VariableUploaded bymorexyz
- Quiz Feedback _ CourseraUploaded byanon_74471635
- A Short Course on PROBABILITY and SAMPLINGUploaded byAbhijit Kar Gupta
- Multiple RegressionUploaded byKhawaja Naveed Haider
- ML Week 3 Logistic RegressionUploaded byBhargavprasad Kulkarni
- ML Exercise 1Uploaded byc_mc2
- Partial DerivativesUploaded byAnik
- Boolean AlgebraUploaded byTejas Bhandari
- Octave Tutorial Q 4Uploaded byGrinCurtis
- 1 Linear Regression With One VariableUploaded byRamon Lins
- File Handling AssignmentsUploaded bychandni1972
- Quiz Feedback _ CourseraUploaded byNaveed Khan
- ML-notesUploaded byAlex Weiner
- Ng Machine Learning NotesUploaded byTom Jeffries
- Linear Regression with One Variable.docxUploaded bysudhansu_senapati
- apostilaUploaded byMaria Fernanda Ribeiro Dias
- 9. XV. Anomaly DetectionUploaded byAhsan
- Coursera Introduction to Marketing QuizzesUploaded byijclement07
- RegressionUploaded byparkchick
- Machine LearningUploaded byLDaggerson
- Quiz Feedback _ CourseraUploaded byLeo Ley
- Simple Linear Regression AnalysisUploaded byTom Jubb
- Python for Probability, Statistics, And Machine LearningUploaded bystanleyhartwell
- Coursera marketing examUploaded byPablo Juanes Fernandez
- coursera2Uploaded byVlad Doru
- How to Create and Define Geometry Within Star CCMUploaded byhitokiri_01
- Using XPath in C#Uploaded bypjotor
- Intergal CalculusUploaded byVishay Raina

- Factor AnalysisUploaded bySaira Anwar
- Take-Home-Quiz-2.pdfUploaded byjosiah resurreccion
- Prob1_PS6Uploaded byniksurveys
- Structural Equation ModelingUploaded bySami Shaikh
- June 2014 (R) QP - S1 EdexcelUploaded byChoudhry Walid
- ebs3Uploaded byerica
- Amr Word FileUploaded bychiragsadwani
- 7_Continuous Markov ProcessesUploaded byA Hasib Chowdhury
- Students Tutorial Answers Week6Uploaded byHeoHamHố
- CHAP 7.pptUploaded bySenelwa Anaya
- BA1040 exam 2011Uploaded byS.L.L.C
- lec37Uploaded byKofi Appiah-Danquah
- OutputUploaded byKaran Khanna
- 178. sathiyaAMS53-56-2013Uploaded byebenesarb
- chap9Uploaded byjo
- KrigUploaded byJuan Carlos Gonzalez L
- Regression AnalysisUploaded byjjjjkjhkhjkhjkjk
- COMPARING WEIGHTING METHODS IN PSM.pdfUploaded byheh1992
- Marketing MixUploaded bysandeepkaur25
- midsem_soln.pdfUploaded byRodolfo Young
- Mth 157 Fall 2015 Homework FiveUploaded bycary
- Homework+4+-+Likelihood+of+Sample+Means+and+the+One+Sample+T-Test+-+2017-10-16+-+ANSWER+KEY+for+SakaiUploaded byRita Desai
- Wiesinger 2010 BA Risk Adjusted Performance Measurement State of the ArtUploaded byabhishek210585
- Mrp PrimerUploaded byElizabeth Collins
- v48i02Uploaded byakrause
- LU2_Lecture 3 Mann-Whitney Rank Sum TestUploaded bynurul diyana
- Unit 3 ( SAMPLE AND SAMPLE DISTRIBUTIONS )Uploaded byZara Nabilah
- Assignment (Probabilty Theory Probability Distribution, Correlation Regression AnanlysisUploaded byishikadhamija24
- endersMLprimer.pdfUploaded byDavid A. Barraza
- Advanced Topics in SPCUploaded byAngélica Ramos Lopez