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

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)
主站蜘蛛池模板: 成武县| 延吉市| 巧家县| 肥东县| 遂宁市| 神木县| 赞皇县| 旅游| 昌黎县| 黄大仙区| 鹰潭市| 利津县| 潜山县| 陈巴尔虎旗| 霍邱县| 黑龙江省| 河北省| 望都县| 海晏县| 潜江市| 南丰县| 垣曲县| 平湖市| 奈曼旗| 宝鸡市| 仙桃市| 丰台区| 昭通市| 阿城市| 乃东县| 乌审旗| 平江县| 阿图什市| 炎陵县| 贡觉县| 花莲市| 常熟市| 南雄市| 宝丰县| 和田县| 杭锦后旗|