摘要:
import numpy as np import sklearn.datasets #加载原数据 from sklearn.model_selection import train_test_split #分割数据 from matplotlib import pyplot as plt from sklearn.linear_model import LinearRe... 阅读全文
摘要:
import numpy as np import matplotlib.pyplot as plt #创造数据 x = [-2,6,-2,7,-3,3,0,8,1,10,2,12,2,5,3,6,4,5,2,15,1,10,4,7,4,11,0,3,-1,4,1,5,3,11,4,6] x = np.mat(x).reshape(-1,2) y = [1,1,-1,1,1,1,-1,-1,-1... 阅读全文