# we create 50 separable pointsX,Y=make_blobs(n_samples=50,centers=2,random_state=0,cluster_std=0.60)# fit the modelclf=SGDClassifier(loss="hinge",alpha=0.01,n_iter=200,fit_intercept=True)clf.fit(X,Y)# plot the line, the points, and the nearest vectors to the planexx=np.linspace(-1,5,10)yy=np.linspace(-1,5,10)X1,X2=np.meshgrid(xx,yy)Z=np.empty(X1.shape)for(i,j),valinnp.ndenumerate(X1):x1=valx2=X2[i,j]p=clf.decision_function([[x1,x2]])Z[i,j]=p[0]