condense(class)
condense()所属R语言包:class
Condense training set for k-NN classifier
K-NN分类凝结训练集
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Condense training set for k-NN classifier
K-NN分类凝结训练集
用法----------Usage----------
condense(train, class, store, trace = TRUE)
参数----------Arguments----------
参数:train
matrix for training set
训练集的矩阵
参数:class
vector of classifications for test set
向量测试集的分类
参数:store
initial store set. Default one randomly chosen element of the set.
初始存储设置。默认的随机选择的元素集合。
参数:trace
logical. Trace iterations? </table>
逻辑。跟踪迭代? </ TABLE>
Details
详情----------Details----------
The store set is used to 1-NN classify the rest, and misclassified patterns are added to the store set. The whole set is checked until no additions occur.
商店集1 - NN分类截断,误判的模式被添加到存储设置。一整套的检查,直到没有发生增加。
值----------Value----------
Index vector of cases to be retained (the final store set).
要保留指数的情况下,向量(最后的商店集)。
参考文献----------References----------
Pattern Recognition. A Statistical Approach. Prentice-Hall, pp. 119–121.
Pattern Recognition and Neural Networks. Cambridge.
Modern Applied Statistics with S. Fourth edition. Springer.
参见----------See Also----------
reduce.nn, multiedit
reduce.nn,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, , drop=FALSE], test, cl[keep])
keep2 <- reduce.nn(train, keep, cl)
knn(train[keep2, , drop=FALSE], test, cl[keep2])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|