- Machine Learning for OpenCV
- Michael Beyeler
- 77字
- 2021-07-02 19:47:25
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)
推薦閱讀
- Advanced Quantitative Finance with C++
- ThinkPHP 5實(shí)戰(zhàn)
- AngularJS深度剖析與最佳實(shí)踐
- Instant QlikView 11 Application Development
- Monitoring Elasticsearch
- LabVIEW虛擬儀器程序設(shè)計(jì)從入門(mén)到精通(第二版)
- ExtJS Web應(yīng)用程序開(kāi)發(fā)指南第2版
- PHP與MySQL權(quán)威指南
- Python全棧開(kāi)發(fā):基礎(chǔ)入門(mén)
- 實(shí)戰(zhàn)Python網(wǎng)絡(luò)爬蟲(chóng)
- MySQL從入門(mén)到精通
- 川哥教你Spring Boot 2實(shí)戰(zhàn)
- Flask Web開(kāi)發(fā)實(shí)戰(zhàn):入門(mén)、進(jìn)階與原理解析
- HTML5 Boilerplate Web Development
- 區(qū)塊鏈社會(huì):區(qū)塊鏈助力國(guó)家治理能力現(xiàn)代化