The argument “offset” of the function “clover_plot” provides an option to use different amounts of offset of the plotted points from the coordinate axes. This ensures that each plotted point can be easily (visually) attributed to the appropriate quadrant.
First we generate data from bivariate normal distributions with different means and the same variance matrices and compute the necessary quantities:
library(mvtnorm)
n1 <- 100
n2 <- 75
set.seed(2020)
X <- rmvnorm(n1, mean=c(0,0), sigma=diag(2)) # Observations of class 1
Y <- rmvnorm(n2, mean=c(2,2), sigma=diag(2)) # Observations of class 2
res <- clover_calc(X, Y)
The clover plot with the default value of offset=0.025:
clover_plot(res)
## Misclassification rate of the QDA classifier: 0.0857
## Non-classification rate of the QDA classifier: 0
##
## Misclassification rate of the DD1 classifier: 0.0914
## Non-classification rate of the DD1 classifier: 0.0686
The clover plot with a larger value of the offset parameter:
clover_plot(res, offset=0.075)
## Misclassification rate of the QDA classifier: 0.0857
## Non-classification rate of the QDA classifier: 0
##
## Misclassification rate of the DD1 classifier: 0.0914
## Non-classification rate of the DD1 classifier: 0.0686