Learn R Programming

folda (version 0.1.0)

plot.ULDA: Plot Decision Boundaries and Linear Discriminant Scores

Description

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.

Usage

# S3 method for ULDA
plot(x, datX, response, ...)

Value

A ggplot2 plot object, either a density plot or a scatter plot with decision boundaries.

Arguments

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 datX.

...

Additional arguments.

Examples

Run this code
fit <- folda(datX = iris[, -5], response = iris[, 5], subsetMethod = "all")
plot(fit, iris[, -5], iris[, 5])

Run the code above in your browser using DataLab