Hallo everyone.
Newbie here, trying to learn.
I have some data points on the (x,y) field that are supposed to be cotegorised into two categories denoted here with X and O like this
import numpy as np
import matplotlib.pyplot as plt
x1 = np.array([0.1,0.3,0.1,0.6,0.4,0.6,0.5,0.9,0.4,0.7])
x2 = np.array([0.1,0.4,0.5,0.9,0.2,0.3,0.6,0.2,0.4,0.6])
c=np.array([ 1,1,1,1,1,0,0,0,0,0 ])
plt.plot(x1[c==0], x2[c==0], 'bo')
plt.plot(x1[c==1], x2[c==1], 'rx')

Now I want to find a way so I can find the “best fitting curve” separating those like this

First I though maybe I try nearest neighbor method but I’ve been told it cannot apply here and that there’s a much simpler way to do it with an ANN but I can’t understand how.
Any ideas on what to use and/or how to do it?
Thank you everyone in advance!