最新回答 / weixin_慕尼黑7100639
<...code...>import matplotlib.pyplot as pltimport numpy as npy = df.loc[0:100, 4].values #loc/iloc得统一y = np.where(y == 'Iris-setosa', -1, 1)#抽出第0列和第2列X = df.loc[0:100, [0, 2]].values # loc/iloc得统一plt.scatter(X[:50, 0], X[:5...
2021-06-03
IndexError: boolean index did not match indexed array along dimension 0; dimension is 100 but corresponding boolean dimension is 101
2021-06-03
数据文件(iris.data.csv):https://graph-bed-1256708472.cos.ap-chengdu.myqcloud.com/pythondata%2Firis.data.csv
2020-07-19