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

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)
主站蜘蛛池模板: 昆山市| 子长县| 额尔古纳市| 林口县| 临武县| 丹棱县| 册亨县| 朝阳区| 三河市| 台东市| 云林县| 简阳市| 武汉市| 连云港市| 长春市| 郁南县| 大新县| 泰宁县| 靖州| 甘泉县| 苍南县| 玉溪市| 大石桥市| 佛坪县| 江山市| 苍溪县| 曲沃县| 德昌县| 锡林郭勒盟| 汪清县| 雅江县| 松江区| 德阳市| 宝兴县| 桃园市| 科尔| 平凉市| 玛多县| 双城市| 康平县| 大石桥市|