- 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)
推薦閱讀
- Beginning Java Data Structures and Algorithms
- 無代碼編程:用云表搭建企業數字化管理平臺
- Python從入門到精通(精粹版)
- C/C++常用算法手冊(第3版)
- C語言程序設計同步訓練與上機指導(第三版)
- 從Java到Web程序設計教程
- Hands-On GUI Programming with C++ and Qt5
- Go語言開發實戰(慕課版)
- 汽車人機交互界面整合設計
- Spring 5 Design Patterns
- 遠方:兩位持續創業者的點滴思考
- Visual C++從入門到精通(第2版)
- jQuery Mobile Web Development Essentials(Second Edition)
- JBoss AS 7 Development
- Zend Framework 2 Cookbook