predict.sprmda: Predict method for models of class sprmda

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Predictions from SPRM-DA classification model.

Usage

1
2
## S3 method for class 'sprmda'
predict(object, newdata, ...)

Arguments

object

object of class sprmda.

newdata

optional data frame with new observations.

...

further arguments. Currently not used.

Details

If newdata is specified the SPRM-DA model is used to predict the fitted values for this data set, otherwise the fitted values of the model are returned.

Value

predict.sprmda returns a vector of the predicted classmembership.

Author(s)

Irene Hoffmann

References

Hoffmann, I., Filzmoser, P., Serneels, S., Varmuza, K., Sparse and robust PLS for binary classification.

See Also

sprmda, sprmdaCV

Examples

1
2
3
4
data(iris)
data <- droplevels(subset(iris,iris$Species!="setosa"))
smod <- sprmda(Species~.,data, a=2, eta=0.5, class="lda")
table(data$Species, predict(smod))

sprm documentation built on May 2, 2019, 9:57 a.m.