- Machine Learning with scikit:learn Quick Start Guide
- Kevin Jolly
- 163字
- 2021-06-24 18:15:56
The k-NN algorithm
Mathematically speaking, the k-NN algorithm is one of the most simple machine learning algorithms out there. See the following diagram for a visual overview of how it works:
The stars in the preceding diagram represent new data points. If we built a k-NN algorithm with three neighbors, then the stars would search for the three data points that are closest to it.
In the lower-left case, the star sees two triangles and one circle. Therefore, the algorithm would classify the star as a triangle since the number of triangles was greater than the number of circles.
In the upper-right case, the star sees two circles and one circle. Therefore, the algorithm will classify the star as a circle since the number of circles was greater than the number of triangles.
The real algorithm does this in a very probabilistic manner and picks the category/shape with the highest probability.
- 大學(xué)計(jì)算機(jī)基礎(chǔ):基礎(chǔ)理論篇
- 高性能混合信號(hào)ARM:ADuC7xxx原理與應(yīng)用開發(fā)
- 實(shí)時(shí)流計(jì)算系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)
- MicroPython Projects
- 分布式多媒體計(jì)算機(jī)系統(tǒng)
- Spark大數(shù)據(jù)技術(shù)與應(yīng)用
- 人工智能實(shí)踐錄
- 貫通Java Web開發(fā)三劍客
- 計(jì)算機(jī)組網(wǎng)技術(shù)
- 手機(jī)游戲策劃設(shè)計(jì)
- 智慧未來(lái)
- 生成對(duì)抗網(wǎng)絡(luò)項(xiàng)目實(shí)戰(zhàn)
- Learning Cassandra for Administrators
- Oracle 11g Anti-hacker's Cookbook
- FANUC工業(yè)機(jī)器人虛擬仿真教程