Find the exactly correct separating hyperplane of SVM when the data is not perfectly linearly separable

I am thinking about the following case where the data in region 1 is always positive and the data in region 2 is always negative, but the data in region 3 can be both positive and negative. Are there any existing results on finding exactly the $$l_1$$ and $$l_2$$ (or region 3)? As far as my understanding of SVM when the data is not perfectly linearly separable, we can maximize the soft margin to find the separating hyperplane. We can control the penalty of misclassification to achieve different separating hyperplanes. But is there a method for finding the exactly correct separating plane like $$l_1$$ and $$l_2$$? I am not very familiar with SVM, and I would really appreciate it if you can provide some comments or references.

You can do this twice to get both lines $$l_1$$ and $$l_2$$.
• I am sorry, but I didn't quite get how can you run hard SVM when the data is not perfectly separable? For example, in order to get $l_1$, do we need to manually preprocess the data, like changing the positive examples under $l_1$ to be negative and then run hard SVM to get $l_1$? Could you explain more about running hard SVM for positive labels and running soft SVM for negative labels? May 26 '21 at 16:40
• Look at the hard SVM definition and the soft SVM definition. Now, create a linear program where for positive labels you add the hard SVM constraint, and for negative labels you put the soft SVM constraint. The solution to this LP is $l_2$ May 26 '21 at 18:22