plot.ULDA | R Documentation |
This function plots the decision boundaries and linear discriminant (LD) scores for a given ULDA model. If it is a binary classification problem, a density plot is created. Otherwise, a scatter plot with decision boundaries is generated.
## S3 method for class 'ULDA'
plot(x, datX, response, ...)
x |
A fitted ULDA model object. |
datX |
A data frame containing the predictor variables. |
response |
A factor representing the response variable (training labels)
corresponding to |
... |
Additional arguments. |
A ggplot2
plot object, either a density plot or a scatter plot with
decision boundaries.
fit <- folda(datX = iris[, -5], response = iris[, 5], subsetMethod = "all")
plot(fit, iris[, -5], iris[, 5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.