Re: Confused on question 6.
Quote:
Quote:

Re: Confused on question 6.
no worries! :)
x_n is a vector of 3 values. x_n = [x_n1, x_n2, x_n3]. Each value can be 0 or 1. So there could 8 (2 * 2 * 2) distinct set of x_n vector values. In digital logic, the boolean values true/false are represented as 1 and 0. 1 is true and 0 is false. in 6c) The problem defines g as XOR: "if the number of 1's in x is odd, g returns 1; if it is even g returns 0". Consider x_n = [1,0,0] then, the number of 1 in this example is 1, which is odd, so g returns 1. so g(x_n) = 1. 
Re: Confused on question 6.
Sorry, I am also a bit confused on question #6.
Specifically, I want to understand 6(d). It says g returns the opposite of the XOR function: if the number of 1s is odd, it returns 0, otherwise it returns 1. Here is what I am unclear on. Is the meaning of 6(d) that the hypothesis on set D is simply D, and then outside of D it is this opposite of XOR function? Or is 6(d) trying to define a hypothesis for the entire dataset? Clearly, 6(d) does the exact wrong thing on D, so by definition there are no target functions that satisfy 6(d) if that's the function defined on the whole dataset. But if he's only describe what g does outside of D, then it's a totally valid target function. Let me ask my question a different way; perhaps that will be clearer. For 6(d), is g[0,0,0] = 0 or is g[0,0,0]=1? 
Re: Confused on question 6.
"We want to determine the hypothesis that agrees the most with the possible target functions." and we are measuring this by counting how many of the 3 points not in D, agree with the hypothesis for each of the 8 target functions. In 6(a) & 6(b), the hypothesis is only defined on the last three points. Although 6(c) & (d) are not, it is known to us what f(x) is for points in D. So I think you are more interested in g[1,1,1], g[1,1,0], g[1,0,1].

Re: Confused on question 6.
Quote:

Re: Confused on question 6.
Quote:

Re: Confused on question 6.
I still don't think I'm interpreting this question correctly.
For 6(d), the function described does not match the data set D. So, given that, am I correct in thinking that for hypothesis 6(d) there are zero target functions that match the hypothesis? Because, by definition, a target function must agree with the given data set D. Right? 
Re: Confused on question 6.
Yes. the target function agrees with D and there are 8 of them.
Now we want to determine the hypothesis that agrees the most with the possible target functions. Problem 6 defines this measurement as counting how many of the target functions match with each hypothesis on the three points.:) 
Re: Confused on question 6.
I'm confused, were we supposed to work this out by hand or were we supposed to code it out?

All times are GMT 7. The time now is 11:33 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. AbuMostafa, Malik MagdonIsmail, and HsuanTien Lin, and participants in the Learning From Data MOOC by Yaser S. AbuMostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.