How to draw a line using the given information?

skate

New member
Joined
Jan 21, 2021
Messages
4
Hello,

I came across this graph in a ML course.

Perceptron Lines.png

The solid line is defined by theta = [1, -1] with an offset of 1. The dotted line is defined by theta = [2, 2] with an offset of 2.

I thought the lines would go through y-intercept 1 and point 1,-1 (and y-intercept 2 and point 2,2). But looks like that's not correct. Can anyone please tell me how these two lines were drawn?

Thanks.
 
I don't know what ML means, or what theta means. (I would expect it to be an angle, but [-1, 1] looks more like an interval or maybe a point or vector). And what do you mean by "offset"?

Please explain the notation and terminology.
 
Can anyone please tell me how these two lines were drawn?
We're eagerly waiting to find out what this problem is about. It occurs to me that I should explicitly ask you to show the entire problem -- not just the picture, but the exact words used to explain it. But I think the main thing we need is the context: what topic is being taught, and how the notation has been defined. If I were sitting next to you, I would have your textbook in my hands to skim through the chapter and see what it says.
 
Sorry for not being very clear. This is about Linear Classifiers, in Machine Learning. I am attaching a screenshot that explains the conventions.

01.png

Thanks.
 
And this was not part of a question/problem. The graph (from my OP) was used to explain an algorithm and I was not able to understand it.
 
And this was not part of a question/problem. The graph (from my OP) was used to explain an algorithm and I was not able to understand it.
Whatever it's part of, why not show us what was said about it? Sometimes a few words are worth a thousand (unexplained) pictures! So seeing the algorithm may help us figure this out.

Sorry for not being very clear. This is about Linear Classifiers, in Machine Learning. I am attaching a screenshot that explains the conventions.

View attachment 24568

Thanks.
Do they define what they mean by "offset"? Or is the term used in any other examples that might illustrate what they mean?

I came across this graph in a ML course.

View attachment 24540

The solid line is defined by theta = [1, -1] with an offset of 1. The dotted line is defined by theta = [2, 2] with an offset of 2.

I thought the lines would go through y-intercept 1 and point 1,-1 (and y-intercept 2 and point 2,2). But looks like that's not correct. Can anyone please tell me how these two lines were drawn?
Evidently this example is in two dimensions, and the column vectors are being represented as rows. The solid line, I suppose, might represent the equation \([1, -1]\cdot x=k\), where k is a constant number, likely called the "offset". (I'd think they would have written an equation somewhere that you could show, but this form is suggested by the illustration, which shows \(\theta_Tx=0\), presumably with offset 0.)

The picture doesn't appear to show the thetas accurately, as they appear to be the same length, and the second should be twice as long. But to check my guess, consider a couple points on each line. The first line would be 1x-1y=1 if I'm guessing right; but (0, 1) and (1, 2) both satisfy a different equation: 1*0-1*1=-1 and 1*1-1*2=-1. So maybe the offset is -k?

How about the second line, which would be 2x+2y=-2 if my new guess is right? The point (0,-1) satisfies 2*0+2*-1=-2, and (1,-2) satisfies 2*1+2*-2=-1.

Does that make sense? The line (hyperplane) with normal theta and offset k is \(\theta\cdot x = -k\), that is, \(\theta\cdot x + k=0\).
 
Whatever it's part of, why not show us what was said about it? Sometimes a few words are worth a thousand (unexplained) pictures! So seeing the algorithm may help us figure this out.

I am not sure if it's frowned upon to take screenshots from the course and share it somewhere else. That's why I am a little apprehensive.

Your explanation makes sense. Thank you very much.
 
Last edited:
I am not sure if it's frowned upon to take screenshots from the course and share it somewhere else. That's why I am a little apprehensive.

Your explanation makes sense. Thank you very much.
I asked for words, not pictures, though sometimes an image of the whole thing is clearer, if only by making it clear that nothing was left out. But if you think the problem is resolved, and you can move forward, we can call it done.
 
Top