{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

practice-midterm-sol

# practice-midterm-sol - CS229 Practice Midterm Solutions 1...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CS229 Practice Midterm Solutions 2 = H i,j H = - M X k =1 2 ∂η 2 a ( η ( k ) ) x ( k ) x ( k ) T z T Hz = - M X k =1 2 ∂η 2 a ( η ( k ) )( z T x ( k ) ) 2 If 2 ∂η 2 a ( η ) 0 for all η , then z T Hz 0 . If H is negative semi-definite, then the original optimization problem is concave. (b) [3 points] When the response variable is distributed according to a Normal distribu- tion (with unit variance), we have b ( y ) = 1 2 π e - y 2 2 , T ( y ) = y , and a ( η ) = η 2 2 . Verify that the condition(s) you gave in part (a) hold for this setting. Answer: 2 ∂η 2 a ( η ) = 1 0 . 2. [15 points] Bayesian linear regression Consider Bayesian linear regression using a Gaussian prior on the parameters θ R n +1 . Thus, in our prior, θ ∼ N ( ~ 0 , τ 2 I n +1 ), where τ 2 R , and I n +1 is the n +1-by- n +1 identity matrix. Also let the conditional distribution of y ( i ) given x ( i ) and θ be N ( θ T x ( i ) , σ 2 ), as in our usual linear least-squares model. 1 Let a set of m IID training examples be given (with x ( i ) R n +1 ). Recall that the MAP estimate of the parameters θ is given by: θ MAP = arg max θ m Y i =1 p ( y ( i ) | x ( i ) , θ ) ! p ( θ ) Find, in closed form, the MAP estimate of the parameters θ . For this problem, you should treat τ 2 and σ 2 as fixed, known, constants. [Hint: Your solution should involve deriving something that looks a bit like the Normal equations.] Answer: θ MAP = arg max θ m Y i =1 p ( y ( i ) | x ( i ) , θ ) !
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 8

practice-midterm-sol - CS229 Practice Midterm Solutions 1...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online