Classification Using Nearest Neighbors

所属分类:人工智能/神经网络/深度学习
开发工具:Python
文件大小:1048KB
下载次数:1
上传日期:2020-07-11 15:31:21
上 传 者jf12345
说明:  1.在BG中加载数据_功能.csv,和背景_对象.csv分成两个独立的数据帧。请注意,这两个文件都有一个标题行,其中列出了变量名。 2.将5个特征数据集明智地组合成一个数据集行,将5个对象数据集明智地组合成一个数据集行。 3.去除共线性 4.使用最小-最大规格化对剩余特征数据集中的每个列进行规范化。请不要规范化对象数据集。 5.随机抽取80%的特征数据集保存在训练数据集中,剩余的20%保存在测试数据集中。以相同的方式拆分对象数据集。 6.利用训练数据集训练kNN模型。设置k等于训练数据集大小的平方根。 7.使用kNN模型预测测试数据集的目标特征。
(1. Load data in BG_ Features. CSV, and background_ Object. CSV is divided into two independent data frames. Notice that both files have a header line that lists the variable names. 2. Intelligently combine five feature datasets into one dataset row, and five object datasets into one dataset row. 3. Remove collinearity 4. Use min max normalization to normalize each column in the remaining feature dataset. Do not normalize the object dataset. 5. Randomly extract 80% of the feature data set and save it in the training data set, and the remaining 20% in the test data set. Split the object dataset in the same way. 6. Train the KNN model with the training data set. Set K equal to the square root of the training data set size. 7. Using the KNN model to predict the target characteristics of the test data set.)

文件列表:
code.py (3216, 2020-05-18)
CUNN_features.csv (2337404, 2020-05-17)
CUNN_objects.csv (9059, 2020-05-17)
knn算法应用实例.docx (16100, 2020-05-14)

近期下载者

相关文件


收藏者