Boosting für Klassifikationsbäume
Boosting-Klassifikationsmodelle lassen sich mit der Funktion ada()
im gleichnamigen Erweiterungspaket berechnen. Die
Funktion eignet sich nur für Klassifikationsfragen, Regressionsbäume beherrscht sie
nicht.
# Standard-S3-Methode: ada(x, y, test.x, test.y = NULL, loss = c("exponential", "logistic"), type = c("discrete", "real", "gentle"), iter = 50, nu = 0.1, bag.frac = 0.5, model.coef = TRUE, bag.shift = FALSE, max.iter = 20, delta = 10^(-10), verbose = FALSE, na.action = na.rpart, ...) # S3-Methode für die Klasse "formula": ada(formula, data, ..., subset, na.action = na.rpart)
Berechnen wir jetzt mit ada()
ein
Boosting-Modell für die SpamBase
-Trainingsdaten:
> library(ada) > > (Spam.ada <- ada(ist.Spam ~ ., data ...
Get R in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.