reduce.nn(class)
reduce.nn()所属R语言包:class
Reduce Training Set for a k-NN Classifier
减少训练集的K-NN分类
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Reduce training set for a k-NN classifier. Used after condense.
减少了K-NN分类器的训练集。用于后condense。
用法----------Usage----------
reduce.nn(train, ind, class)
参数----------Arguments----------
参数:train
matrix for training set
训练集的矩阵
参数:ind
Initial list of members of the training set (from condense).
初始训练集的成员名单(从condense)。
参数:class
vector of classifications for test set </table>
向量测试集</ TABLE>分类
Details
详情----------Details----------
All the members of the training set are tried in random order. Any which when dropped do not cause any members of the training set to be wrongly classified are dropped.
训练集的所有成员都试图在随机顺序。任何时候下降不会导致培训设置为被错划的任何成员都将被丢弃。
值----------Value----------
Index vector of cases to be retained.
指数向量的情况下予以保留。
参考文献----------References----------
IEEE Trans. Information Theory IT-18, 431–432.
Pattern Recognition and Neural Networks. Cambridge.
Modern Applied Statistics with S. Fourth edition. Springer.
参见----------See Also----------
\link{condense}, multiedit
\link{condense},multiedit
举例----------Examples----------
train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
keep <- condense(train, cl)
knn(train[keep,], test, cl[keep])
keep2 <- reduce.nn(train, keep, cl)
knn(train[keep2,], test, cl[keep2])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|