Description Usage Arguments Details Value References See Also Examples
Predict new examples by a trained discriminant adaptive multinomial model.
1 | predict.damultinom(object, newdata, ...)
|
object |
Object of class |
newdata |
A |
... |
Arguments passed to or from other methods. |
This function is a method for the generic function predict()
for class
"damultinom"
.
It can be invoked by calling predict(x)
for an object x
of the
appropriate class, or directly by calling predict.damultinom(x)
regardless of
the class of the object.
In contrast to predict.multinom
predict.damultinom
does not have
a type argument. Both, the predicted posterior probabilities and the class labels, are returned.
A list
with components:
class |
The predicted class labels (a |
posterior |
Matrix of class posterior probabilities. |
Hand, D. J., Vinciotti, V. (2003), Local versus global models for classification problems: Fitting models where it matters, The American Statistician, 57(2) 124–130.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
damultinom
, dannet
, multinom
, nnet
.
1 2 3 4 5 6 7 | fit <- damultinom(Species ~ Sepal.Length + Sepal.Width, data = iris, wf = "gaussian", bw = 0.5, Hess=TRUE)
pred <- predict(fit)
mean(pred$class != iris$Species)
fit <- damultinom(Species ~ Sepal.Length + Sepal.Width, data = iris, wf = "gaussian", bw = 0.5, weights=1:nrow(iris), trace=FALSE)
pred <- predict(fit)
mean(pred$class != iris$Species)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.