先看下效果图: # 先调入需要的模块 import numpy as np import matplotlib.pyplot as plt from sklearn import svm import seaborn as sb # 生成几个数据点 data = np.array([ [0.1, 0.7], [0.3, 0.6], [0.4, 0.1], [0.5, 0.4], [0.8, 0.04], [0.42, 0.6], [0.9, 0.4], [0.6, 0.5], [0.7, 0.2…