?? predict.ada.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 ‘data.frame’. 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=“vector” returns the default class labels.
type=“prob” returns the probability class estimates.
type=“both” returns both the default class labels and
probability class estimates.
type=“F” 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< 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=“vector”.
</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 ‘levels’ of the response. The second
column corresponds to the second label in the ‘levels’ of the response.
Probs are returned whenever type=“probs”.
</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 ‘class’. The second element returns the class probability estimates
and will be labeled as ‘probs’.
</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 ‘data.frame’ 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 + -