The argument “samescale” of the function “clover_plot” provides an option to apply, in quadrants II to IV, scaling using the same factor for both marginals. Defaults to FALSE, meaning that more space is used up by the points in the clover plot, providing better visualisation. On the other hand, only when TRUE the min-bagdistance and and min-illumination classifiers (BB0, II0) are plotted as the axis of the respective quadrants, see the examples below.
Note that in quadrant I (the DD-plot) the same scaling factor is always used since the depth is a centrality function, with bounded values, as opposed to the bagdistance, illumination and Mahalanobis distance which are outlyingness functions, with unbounded values.
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 same scaling applied to both marginals in each quadrant:
clover_plot(res, samescale=TRUE, classifiers=c("DD0","BB0","II0"))
## Misclassification rate of the DD0 (max-depth) classifier: 0.0914
## Non-classification rate of the DD0 (max-depth) classifier: 0.0743
##
## Misclassification rate of the BB0 classifier: 0.1086
## Non-classification rate of the BB0 classifier: 0
##
## Misclassification rate of the II0 classifier: 0.1029
## Non-classification rate of the II0 classifier: 0
The clover plot with the default settings:
clover_plot(res, classifiers=c("DD0","BB0","II0"))
## Misclassification rate of the DD0 (max-depth) classifier: 0.0914
## Non-classification rate of the DD0 (max-depth) classifier: 0.0743
##
## Misclassification rate of the BB0 classifier: 0.1086
## Non-classification rate of the BB0 classifier: 0
##
## Misclassification rate of the II0 classifier: 0.1029
## Non-classification rate of the II0 classifier: 0