- 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)
推薦閱讀
- 計算機網(wǎng)絡(luò)
- Learning NServiceBus(Second Edition)
- Visual FoxPro程序設(shè)計教程(第3版)
- ASP.NET MVC4框架揭秘
- Mastering Selenium WebDriver
- INSTANT MinGW Starter
- Instant Typeahead.js
- Java Web應(yīng)用開發(fā)技術(shù)與案例教程(第2版)
- 用Flutter極速構(gòu)建原生應(yīng)用
- 機器學(xué)習(xí)與R語言實戰(zhàn)
- 領(lǐng)域驅(qū)動設(shè)計:軟件核心復(fù)雜性應(yīng)對之道(修訂版)
- WordPress 4.0 Site Blueprints(Second Edition)
- HTML 5與CSS 3權(quán)威指南(第3版·上冊)
- Tableau 10 Bootcamp
- PHP編程基礎(chǔ)與實踐教程