- Mastering Machine Learning for Penetration Testing
- Chiheb Chebbi
- 210字
- 2021-06-25 21:03:03
Clustering with k-means
k-Nearest Neighbors (kNN) is a well-known clustering method. It is based on finding similarities in data points, or what we call the feature similarity. Thus, this algorithm is simple, and is widely used to solve many classification problems, like recommendation systems, anomaly detection, credit ratings, and so on?. However, it requires a high amount of memory. While it is a supervised learning model, it should be fed by labeled data, and the outputs are known. We only need to map the function that relates the two parties. A kNN algorithm is non-parametric. Data is represented as feature vectors. You can see it as a mathematical representation:

The classification is done like a vote; to know the class of the data selected, you must first compute the distance between the selected item and the other, training item. But how can we calculate these distances?
Generally, we have two major methods for calculating. We can use the Euclidean distance:
Or, we can use the cosine similarity:
The second step is choosing k the nearest distances (k can be picked arbitrarily). Finally, we conduct a vote, based on a confidence level. In other words, the data will be assigned to the class with the largest probability.
- EJB 3.1從入門到精通
- 通信網絡基礎與設備
- 物聯網智慧安監技術
- 新一代物聯網架構技術:分層算力網絡
- Hands-On Full Stack Development with Spring Boot 2 and React(Second Edition)
- 信息通信網絡建設安全管理概要2
- 城域網與廣域網(第2版)
- 物聯網之霧:基于霧計算的智能硬件快速反應與安全控制
- Microservice Patterns and Best Practices
- React Cookbook
- 人人都該都懂的互聯網思維
- INSTANT LinkedIn Customization How-to
- Hands-On Bitcoin Programming with Python
- 智慧城市中的物聯網技術
- Architecting Data:Intensive Applications