用python实现一个简单的最近邻算法
这是一个简答预测电影类型的示例,只有四组数据。
1.读取数据
2.计算每个样本与测试样本之间的欧氏距离
3.对距离进行排序
4.得出最近的样本和标签
forked from strivehub/KNN-
-
Notifications
You must be signed in to change notification settings - Fork 0
dcn01/KNN-
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
About
用python实现一个简单的最近邻算法 1.读取数据 2.计算每个样本与测试样本之间的欧氏距离 3.对距离进行排序 4.得出最近的样本和标签
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%