# Does the image is logistic regression or SVM, and why? [closed]

Does the image is logistic regression or SVM, and why? • Do you know something about SVM or logistic regression? Have you done a little bit of research before asking? Is this a homework problem/question? Please, edit your post to include all the context. – nbro Dec 16 '20 at 19:37
• I think svm in non linear here because there is a gap between points and borders of circle as I understood .. but the line is logistic regression because there is no a gap .. If I'm right .. what is the role of the function here – user5520049 Dec 16 '20 at 20:26
• Please, edit your post to include your thoughts and interpretation of the image and what you're confused about. – nbro Dec 16 '20 at 22:05
• I downvoted because this question does not show any research effort. You just pasted a picture and asked for the solution. You didn't even explain what your knowledge of the topic is. I expect people to do some research before asking a question and provide some context. Edit your post to include some context and what you've tried to understand that picture, then I will remove my downvote. – nbro Dec 16 '20 at 22:15
• Now, you need to clarify something first. What does this mean "what is the role of the function"? What function are you talking about, $g$? You need to specify this. I know this takes time, i.e. it takes time to write a clear/good question. – nbro Dec 16 '20 at 22:17

## 1 Answer

The straight dashed-line shows the typical decision line in logistic regression or any linear classifier. The dashed-circle shows the decision line from SVM. Obviously, since the data is not linearly separable in the original 2D feature space, if someone makes a higher dimension space by taking into account non-linear interaction of the original 2 features then they can discriminate between x and o data using a linear discriminator applied in higher dimensions. This shows the beauty of kernel methods that can make a linear yet high-dimensional (infinite dimensions indeed) problem from a non-linear low-dimensional problem (finite dimensions actually).

• thanks for answering but what is the function denote to ? – user5520049 Dec 16 '20 at 21:29
• so i cannot decide one type of learning here I mean svm or logistic ? – user5520049 Dec 16 '20 at 21:42
• yes, the example shows that SVM is better here since the dashed-circle can discriminate between o and x data, but the dashed-line (from logistic regression) cannot discriminate between the two classes of data (o and x). – F4RZ4D Dec 16 '20 at 22:10
• excuse how can the line not discriminate between x and o .. i know that logistic regression used for classification so it can classify between them .. or when can logistic regression can discriminate .. appreciate your time – user5520049 Dec 16 '20 at 23:56
• It's simple, can you draw a straight line that perfectly discriminates between o and x points in the picture? Of course, we can draw a straight line, but the classification would not be accurate. The answer is no, so, this problem is not linearly solvable with good accuracy. If all the o 's where on left and all x 's were on right, then a straight line could discriminate between them perfectly. – F4RZ4D Dec 17 '20 at 1:00