def testData():
num_puntos =2000
conjunto_puntos =[]
for i in range(num_puntos):
if np.random.random()>0.5:
x,y =np.random.normal(0.0,0.9),np.random.normal(0.0,0.9)
conjunto_puntos.append([x,y])
else:
x, y = np.random.normal(3.0, 0.5), np.random.normal(1.0, 0.5)
conjunto_puntos.append([x, y])
df =pd.DataFrame({'x':[v[0] for v in conjunto_puntos],'y':
[v[1] for v in conjunto_puntos]})
sns.lmplot('x','y',data=df,fit_reg=False,size=6)
plt.show()
############??????###############
评论列表
文章目录