LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > Homework 5

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-05-2013, 06:55 PM
marek marek is offline
Member
 
Join Date: Apr 2013
Posts: 31
Default Hw5 Q8 E_out

I am struggling to understand how to calculate E_{out} in this question. I have two competing theories, which I will describe below. Any help is greatly appreciated.

Once the algorithm terminates, I have w^{(t)}. I now generate a new set of data points \{X_i\}_{i=1}^M. Using my original target function to generate the corresponding Y_i = f(X_i).

Case 1. Just use the same cross entropy error calculation but on this new data set.

E_{out} = \frac{1}{M} \sum_{i=1}^M \ln (1+e^{-Y_i w^\top X_i})

Case 2. Directly calculate the expected output of our hypothesis function and compare to Y_i.

g(X_i) = +1 with probability \theta (w^\top X_i) = \frac{1}{1+e^{-w^\top X_i}}

Ultimately this gives us the probability that our hypothesis aligns with Y:

P(Y_i | X_i) = \theta(Y_i w^\top X_i)

In the lectures/book, we would multiply these probabilities to get the "likelihood" that the data was generated by this hypothesis. However, it seems that averaging over these should give the expected error in this sample.

E_{out} = \frac{1}{M} \sum_{i=1}^{M} (1-P(Y_i | X_i))

It feels as though the first approach is the correct one, but I struggle because the second approach makes intuitive sense since that is how I historically I would have calculated E_{out}. To make matters worse, the two approaches very closely approximate different answers in the question!
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:17 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, 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.