Description Usage Arguments Value Examples
Predicted values based on an "epx
" object; may specify
different base classifier arguments than those used for phalanx-formation.
1 2 |
object |
Object of class " |
newdata |
An optional data frame specifiying variables with which to
predict; if omitted and |
classifier.args |
Additional arguments for the base classifier; same
base classifier as that used for phalanx-formation (specified in
|
... |
Further arguments passed to or from other methods. |
Numeric vector of predicted values (double).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Example with data(harvest)
## Phalanx-formation using a base classifier with 50 trees (default = 500)
set.seed(761)
model <- epx(x = harvest[, -4], y = harvest[, 4],
classifier.args = list(ntree = 50))
## Predict training values without additional classifier.args and newdata
## returns the object's ENSEMBLED.FITS
all.equal(predict(model), model$ENSEMBLED.FITS)
## Predict training values using 100 trees (default = 500)
set.seed(761)
preds100 <- predict(model, classifier.args = list(ntree = 100))
## Predict test values by passing dataframe of test predictors to newdata as
## with the predict(model, newdata = . ) function etc.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.