#1




Question about Qs 7
I haven't seen anyone else raise this question in the forum, so its probably something obvious that I'm missing to see. The question says:
"In each run, choose a random line in the plane as your target function f (do this by taking two random, uniformly distributed points in [1,1] x [1,1] and taking the line passing through them), where one side of the line maps to +1 and the other maps to 1." Given a line, how do I figure out the function which separates points into +1 or 1 based on which side of the line they fall on? 
#2




Re: Question about Qs 7
Quote:
Indeed, one line can represent a function and its negation. Put the equation of the line in the form , where . The vector as well as its negation represent the same line. If you take the function to be , this fixes one of the two functions.
__________________
Where everyone thinks alike, no one thinks very much 
#3




Re: Question about Qs 7
You have 2 points defining the line, so one simple way is to express the line as y= a*x + b (see e.g. http://en.wikipedia.org/wiki/Linear_...Twopoint_form)
then for any point P= (Px, Py) you can verify if Py > a*Px + b so that: f maps P to 1 if [Py > a*Px + b], otherwise it maps P to 1. Or you can invert the mapping. 
#4




Re: Question about Qs 7
Two other related concepts that you can use relate an arbitrary two points A and B on the line to a third point C not on it. The first is the sine of the angle between AB and AC (which can never be zero, but which can have either sign), and the second is the cross product of AB and AC (which will always be perpendicular to the plane, but which can be either up or down).

#5




Re: Question about Qs 7
Quote:
Yogi 
Thread Tools  
Display Modes  

