The argument “uncertain” of the function “clover_plot” enables highlighting the observations which are close to the given classifying boundary curve. The default value is “none”. Other possible values are “QDA”, “DD0”, “DD1”, “DD2”, “BB0”, “BB1”, “II0”, “II1”. The observations are highlighted in all four quadrants of the clover plot, making it easier to classify them using other classifiers.
The value “uncertain.amount” specifies the distance from the classifying boundary curve within which the observations are highlighted. If NULL, a sensible default is used, based on a quantile of interpoint distances in the given quadrant. The value of “uncertain.amount”, either manually specified or determined automatically, is printed in the text output.
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 highlighted points close to the classifying boundary of the “DD1” classifier, with the default value of “uncertain.amount”:
clover_plot(res, uncertain="DD1")
## 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
##
## Highlighted points with uncertain classification w.r.t. DD1
## Value of uncertain.amount: 0.01
The clover plot with highlighted points close to the classifying boundary of the “DD1” classifier, with a manually specified value of “uncertain.amount”:
clover_plot(res, uncertain="DD1", uncertain.amount=0.025)
## 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
##
## Highlighted points with uncertain classification w.r.t. DD1
## Value of uncertain.amount: 0.025