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

📄 predict.ada.html

📁 Adaboost
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Predict a data set using Ada</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 predict.ada {ada}"><tr><td>predict.ada {ada}</td><td align="right">R Documentation</td></tr></table>
<h2>Predict a data set using Ada</h2>


<h3>Description</h3>

<p>
<code>predict</code> classifies a new set of observations from a 
previously built classifier.  This function will provide either 
a vector of new classes, class probability estimates, or both.
</p>


<h3>Usage</h3>

<pre>
## S3 method for class 'ada':
predict(object, newdata = NULL, type = c("vector", "prob", "both","F"),n.iter=NULL,...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
object generated by <code>ada</code>.</td></tr>
<tr valign="top"><td><code>newdata</code></td>
<td>
new data set to predict.  This data set must be
of type &lsquo;data.frame&rsquo;.  Default = NULL.  When default = NULL, predict
produces predictions for the original training set.</td></tr>
<tr valign="top"><td><code>type</code></td>
<td>
choice for preditions.  
type=&ldquo;vector&rdquo; returns the default class labels.
type=&ldquo;prob&rdquo; returns the probability class estimates.
type=&ldquo;both&rdquo; returns both the default class labels and
probability class estimates.
type=&ldquo;F&rdquo; returns the ensamble average, where the class
label is sign(F).  This is mainly usefull for the multiclass case.
</td></tr>
<tr valign="top"><td><code>n.iter</code></td>
<td>
number of iterations to consider for the prediction.  By default
this is iter from the <code>ada</code> call (n.iter&lt; iter)</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
other arguments not used by this function.</td></tr>
</table>

<h3>Details</h3>

<p>
This function was modeled after <code>predict.rpart</code>.  Furthermore,
<code>predict.rpart</code> will be invoked to handle predictions by each tree in
the ensamble.
</p>


<h3>Value</h3>

<table summary="R argblock">
<tr valign="top"><td><code>fit</code></td>
<td>
a vector of fitted responses.  Fit will be returned if type=&ldquo;vector&rdquo;.
</td></tr>
<tr valign="top"><td><code>probs</code></td>
<td>
a matrix of class probability estimates. The first column 
corresponds to the first label in the &lsquo;levels&rsquo; of the response.  The second 
column corresponds to the second label in the &lsquo;levels&rsquo; of the response.  
Probs are returned whenever type=&ldquo;probs&rdquo;.
</td></tr>
<tr valign="top"><td><code>both</code></td>
<td>
returns both the vector of fitted responses and class probability
estimates.  The first element returns the fitted responses and will be labeled
as &lsquo;class&rsquo;.  The second element returns the class probability estimates 
and will be labeled as &lsquo;probs&rsquo;.
</td></tr>
<tr valign="top"><td><code>F</code></td>
<td>
in the multiclass case when one uses the package to perform 1
v.s. all this is used.</td></tr>
</table>

<h3>Note</h3>

<p>
This function is invoked by the <code>summary</code>, <code>pairs</code>, and 
<code>plot</code> S3 generics invoked with an <code>ada</code> object.  If an error occurs in one of the above
commands then try using this command directly to track possible errors.
Also, the newdata data set must be of type &lsquo;data.frame&rsquo; when invoking
<code>summary</code>, <code>pairs</code>, and <code>plot</code>.
</p>


<h3>See Also</h3>

<p>
<code><a href="ada.html">ada.default</a></code>,<code><a href="summary.ada.html">summary.ada</a></code>,<code><a href="print.ada.html">print.ada</a></code>,
<code><a href="plot.ada.html">plot.ada</a></code>,<code><a href="pairs.ada.html">pairs.ada</a></code>,<code><a href="update.ada.html">update.ada</a></code>,<code><a href="addtest.html">addtest</a></code>
</p>



<hr><div align="center">[Package <em>ada</em> version 2.0-1 <a href="00Index.html">Index]</a></div>

</body></html>

⌨️ 快捷键说明

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