LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Chapter 3 - The Linear Model (http://book.caltech.edu/bookforum/forumdisplay.php?f=110)
-   -   Problem 3.6(a) (http://book.caltech.edu/bookforum/showthread.php?t=4775)

tikenn 07-12-2017 05:41 PM

Problem 3.6(a)
I think this is similar to the answer provided for problem 3.5, but I am having a difficult time understanding why, in Problem 3.4, the error is continuous and differentiable at the point y_n\textbf{w}^T\textbf{x}_n=1. I have the three cases looking like this so far:

y_n\textbf{w}^T\textbf{x}_n>1 in which I believe E(\mathbf{x}_n) = 0
y_n\textbf{w}^T\textbf{x}_n<1 in which I believe E(\mathbf{x}_n) = (1 - y_n\textbf{w}^T\textbf{x}_n)^2
y_n\textbf{w}^T\textbf{x}_n=1 in which I believe E(\mathbf{x}_n) = 0

These cases would make y_n\textbf{w}^T\textbf{x}_n=1 non-differentiable because the derivatives from the left and right are different. Am I evaluating the error from the book wrong --> e_n(\textbf{w})=(\max(0,1-y_n\textbf{w}^T\textbf{x}_n))^2?

htlin 07-15-2017 02:27 PM

Re: Problem 3.6(a)
Are the derivatives on the two sides really different? :-)

tikenn 07-16-2017 12:36 AM

Re: Problem 3.6(a)
I apologize, I realize I made an error in labeling the problem that my question refers to. My original question actually refers to Problem 3.4a.


Originally Posted by htlin (Post 12709)
Are the derivatives on the two sides really different? :-)

Anyway, thank you for the hint! My confusion was with how problem 3.5 and problem 3.4 were so different, but I forgot to evaluate the gradients all the way through for both. Thanks!

subbupd 08-24-2017 05:05 AM

Re: Problem 3.6(a)
Correct - evaluating the gradients would work!

All times are GMT -7. The time now is 08:05 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.