validation: Fonction validation

Description Usage Arguments Value Examples

View source: R/validation.R

Description

This function takes a plsda-pred, a prediction computed by the predict function of the plsda package and compare it to the y.exp vector provide. It will returns the residuals, the confusion matrix and the error rate.

Usage

1
validation(result, y.exp)

Arguments

result

The result obtained with the predict.plsda of this package, must contains y.hat and Y.hat as a list.

y.exp

The expected y, it will be confronted to y.hat found in the result parameter, so it must have the same number of items/

Value

A plsda-valid object that contains residuals, confusion matrix and error rate.

Examples

1
2
3
model <- fit(Species ~ ., data = iris)
result <- predict(model, iris[,1:4])
validation(result, iris[,5])

Dampeel/plsda documentation built on May 23, 2019, 8:19 p.m.