官术网_书友最值得收藏!

Making it a binary classification problem

For the sake of simplicity, we want to focus on a binary classification problem for now, where we only have two classes. The easiest way to do this is to discard all data points belonging to a certain class, such as class label 2, by selecting all the rows that do not belong to class 2:

In [9]: idx = iris.target != 2
... data = iris.data[idx].astype(np.float32)
... target = iris.target[idx].astype(np.float32)
主站蜘蛛池模板: 富川| 玉环县| 肃北| 探索| 岳池县| 凤冈县| 淮北市| 涞源县| 台湾省| 邯郸市| 临夏县| 永登县| 东至县| 卫辉市| 凤翔县| 封开县| 比如县| 澎湖县| 越西县| 仪征市| 砀山县| 习水县| 奈曼旗| 上思县| 揭西县| 镇巴县| 鲁甸县| 昆山市| 长沙市| 湖北省| 赣榆县| 广水市| 买车| 昌宁县| 双流县| 玉门市| 会昌县| 白城市| 延庆县| 禄丰县| 吉林省|