train.qda: train.qda

View source: R/train.R

train.qdaR Documentation

train.qda

Description

Provides a wrapping function for the qda.

Usage

train.qda(formula, data, ..., subset, na.action)

Arguments

formula

A formula of the form groups ~ x1 + x2 + ... That is, the response is the grouping factor and the right hand side specifies the (non-factor) discriminators.

data

An optional data frame, list or environment from which variables specified in formula are preferentially to be taken.

...

Arguments passed to or from other methods.

subset

An index vector specifying the cases to be used in the training sample. (NOTE: If given, this argument must be named.)

na.action

Function to specify the action to be taken if NAs are found. The default action is for the procedure to fail. An alternative is na.omit, which leads to rejection of cases with missing values on any required variable. (NOTE: If given, this argument must be named.)

Value

A object qda.prmdt with additional information to the model that allows to homogenize the results.

Note

The parameter information was taken from the original function qda.

See Also

The internal function is from package qda.

Examples


len <- nrow(iris)
sampl <- sample(x = 1:len,size = len*0.20,replace = FALSE)
ttesting <- iris[sampl,]
ttraining <- iris[-sampl,]
model.qda <- train.qda(Species~.,ttraining)
model.qda
prediction <- predict(model.qda, ttesting)
prediction


PROMiDAT/trainR documentation built on Nov. 13, 2023, 3:20 a.m.