predict.ada

0th

Percentile

Predict a data set using Ada

predict 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.

Keywords
methods
Usage
"predict"(object, newdata, type = c("vector", "probs", "both","F"),n.iter=NULL,...)
Arguments
object
object generated by ada.
newdata
new data set to predict. This data set must be of type ‘data.frame’ and prediction data set is required for this approach.
type
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.
n.iter
number of iterations to consider for the prediction. By default this is iter from the ada call (n.iter< iter)
...
other arguments not used by this function.
Details

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

Value

fit
a vector of fitted responses. Fit will be returned if type=“vector”.
probs
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”.
both
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’.
F
this is used in the multiclass case when one uses the package to perform 1 v.s. all.

Note

This function is invoked by the summary, pairs, and plot S3 generics invoked with an ada 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 summary, pairs, and plot.

See Also

ada.default,summary.ada,print.ada, plot.ada,pairs.ada,update.ada,addtest

Aliases
  • predict.ada
Documentation reproduced from package ada, version 2.0-5, License: GPL

Community examples

Looks like there are no examples yet.