⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 condense.html

📁 本程序是基于linux系统下c++代码
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Condense training set for k-NN classifier</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>

<table width="100%" summary="page for condense {class}"><tr><td>condense {class}</td><td align="right">R Documentation</td></tr></table>
<h2>Condense training set for k-NN classifier</h2>


<h3>Description</h3>

<p>
Condense training set for k-NN classifier
</p>


<h3>Usage</h3>

<pre>
condense(train, class, store, trace = TRUE)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>train</code></td>
<td>
matrix for training set
</td></tr>
<tr valign="top"><td><code>class</code></td>
<td>
vector of classifications for test set
</td></tr>
<tr valign="top"><td><code>store</code></td>
<td>
initial store set. Default one randomly chosen element of the set.
</td></tr>
<tr valign="top"><td><code>trace</code></td>
<td>
logical. Trace iterations?
</td></tr>
</table>

<h3>Details</h3>

<p>
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.
</p>


<h3>Value</h3>

<p>
index vector of cases to be retained (the final store set).</p>

<h3>References</h3>

<p>
P. A. Devijver and J. Kittler (1982)
<EM>Pattern Recognition. A Statistical Approach.</EM>
Prentice-Hall, pp. 119&ndash;121.
</p>
<p>
Ripley, B. D. (1996)
<EM>Pattern Recognition and Neural Networks.</EM> Cambridge.
</p>
<p>
Venables, W. N. and Ripley, B. D. (2002)
<EM>Modern Applied Statistics with S.</EM> Fourth edition.  Springer.
</p>


<h3>See Also</h3>

<p>
<code><a href="reduce.nn.html">reduce.nn</a></code>, <code><a href="multiedit.html">multiedit</a></code>
</p>


<h3>Examples</h3>

<pre>
data(iris3)
train &lt;- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
test &lt;- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
cl &lt;- factor(c(rep("s",25), rep("c",25), rep("v",25)))
keep &lt;- condense(train, cl)
knn(train[keep, , drop=FALSE], test, cl[keep])
keep2 &lt;- reduce.nn(train, keep, cl)
knn(train[keep2, , drop=FALSE], test, cl[keep2])
</pre>



<hr><div align="center">[Package <em>class</em> version 7.2-44 <a href="00Index.html">Index]</a></div>

</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -