<p>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).</p>

CC BY-SA 4.0
2020-12-16T21:29:16.970Z
thanks for answering but what is the function denote to ?
user5520049
CC BY-SA 4.0
2020-12-16T21:42:37.813Z
so i cannot decide one type of learning here I mean svm or logistic ?
user5520049
CC BY-SA 4.0
2020-12-16T22:10:45.090Z
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
CC BY-SA 4.0
2020-12-16T23:56:33.947Z
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
CC BY-SA 4.0
2020-12-17T01:00:22.283Z
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
CC BY-SA 4.0
2020-12-16T20:49:27.390Z
2020-12-16T20:49:27.390Z
F4RZ4D
<p>Does the image is logistic regression or SVM, and why?</p>
<p><a href="https://i.sstatic.net/3AYfN.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3AYfN.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2020-12-16T19:37:05.697Z
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
CC BY-SA 4.0
2020-12-16T20:26:44.160Z
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
CC BY-SA 4.0
2020-12-16T22:05:32.260Z
Please, [**edit your post**](https://ai.stackexchange.com/posts/25221/edit) to include your thoughts and interpretation of the image and what you're confused about.
nbro
CC BY-SA 4.0
2020-12-16T22:15:25.717Z
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
CC BY-SA 4.0
2020-12-16T22:17:37.630Z
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
CC BY-SA 4.0
2020-12-16T22:18:32.653Z
i think it's obvious in the image !
user5520049
CC BY-SA 4.0
2020-12-16T22:20:05.293Z
I am familiar with SVM and logistic regression (and I could have provided an answer, but I didn't) and it was not obvious (i.e. it's not obvious for a general person that reads your post). Another question is: What does it mean to ask "if an image is SVM or logistic regression"? That's not your question. Because an image is not a machine learning model. This may be a language issue, but I suggest that you reformulate your question. What are those points? What do the line and circle represent? That's something that you need to answer to understand what's going on in this image.
nbro
CC BY-SA 4.0
2020-12-16T22:21:35.397Z
thanks any way i got my answer !! i don't need you upvote :-)
user5520049
CC BY-SA 4.0
2020-12-16T22:23:11.397Z
I'm just trying to help you formulate clearer questions and posts so that, in the future, you don't get more downvotes. However, if you don't want to follow my advice, I can't do anything.
nbro
<machine-learning><support-vector-machine><logistic-regression>
Does the image is logistic regression or SVM, and why?
user5520049
# Does the image is logistic regression or SVM, and why?

(Asked by: username_0 on 2020-12-16)

Does the image is logistic regression or SVM, and why?

[![enter image description here](https://i.sstatic.net/3AYfN.jpg)](https://i.sstatic.net/3AYfN.jpg)

**Tags:** machine-learning, support-vector-machine, logistic-regression

> **Comments:**
> **username_1**: 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.  
> **username_0**: 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  
> **username_1**: Please, [**edit your post**](https://ai.stackexchange.com/posts/25221/edit) to include your thoughts and interpretation of the image and what you're confused about.  
> **username_1**: 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.  
> **username_1**: 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.  
> **username_0**: i think it's obvious in the image !  
> **username_1**: I am familiar with SVM and logistic regression (and I could have provided an answer, but I didn't) and it was not obvious (i.e. it's not obvious for a general person that reads your post). Another question is: What does it mean to ask "if an image is SVM or logistic regression"? That's not your question. Because an image is not a machine learning model. This may be a language issue, but I suggest that you reformulate your question. What are those points? What do the line and circle represent? That's something that you need to answer to understand what's going on in this image.  
> **username_0**: thanks any way i got my answer !! i don't need you upvote :-)  
> **username_1**: I'm just trying to help you formulate clearer questions and posts so that, in the future, you don't get more downvotes. However, if you don't want to follow my advice, I can't do anything.  

---

## 1 answers

### Answer by username_2 on 2020-12-16. Score: 2 | Accepted 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).

> **Comments:**
> **username_0**: thanks for answering but what is the function denote to ?  
> **username_0**: so i cannot decide one type of learning here I mean svm or logistic ?  
> **username_2**: 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).  
> **username_0**: 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  
> **username_2**: 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.  

---

