# NOT RUN {
# Example with data(harvest)
## Phalanx-formation using a base classifier with 50 trees (default = 500)
# }
# NOT RUN {
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.
# }
Run the code above in your browser using DataLab