The following examples illustrate the typical behaviour of the clover plot and the different classifiers in situations discussed in Tables 5 and 6 in the paper.
In this example we generate observations from the shifted bivariate normal distributions with the same covariance matrix. The first sample contains 50 observations, the second sample contains 200 observations.
library(mvtnorm)
n1 <- 50
n2 <- 200
set.seed(10)
x <- rmvnorm(n=n1, mean=c(0,0), sigma=diag(2))
y <- rmvnorm(n=n2, mean=c(2,2), sigma=diag(2))
res <- clover_calc(x, y, boundaryI=FALSE)
clover_plot_data(res)
clover_plot(res, classifiers=c("DD1","DD0","QDA","BB0","BB1","II1","II0"))
## Misclassification rate of the QDA classifier: 0.088
## Non-classification rate of the QDA classifier: 0
##
## Misclassification rate of the DD0 (max-depth) classifier: 0.064
## Non-classification rate of the DD0 (max-depth) classifier: 0.08
##
## Misclassification rate of the DD1 classifier: 0.048
## Non-classification rate of the DD1 classifier: 0.072
##
## Misclassification rate of the BB0 classifier: 0.092
## Non-classification rate of the BB0 classifier: 0
##
## Misclassification rate of the BB1 classifier: 0.052
## Non-classification rate of the BB1 classifier: 0
##
## Misclassification rate of the II0 classifier: 0.092
## Non-classification rate of the II0 classifier: 0
##
## Misclassification rate of the II1 classifier: 0.076
## Non-classification rate of the II1 classifier: 0
In this example we generate observations from the shifted bivariate normal distributions with different covariance matrices.
n1 <- 200
n2 <- 200
set.seed(12)
x <- rmvnorm(n=n1,mean=c(0,0),sigma=diag(2))
y <- rmvnorm(n=n2,mean=c(2,2),sigma=9*diag(2))
res <- clover_calc(x, y, boundaryI=FALSE)
clover_plot_data(res)
clover_plot(res, classifiers=c("DD1","DD0","QDA","BB0","BB1","II1","II0"))
## Misclassification rate of the QDA classifier: 0.185
## Non-classification rate of the QDA classifier: 0
##
## Misclassification rate of the DD0 (max-depth) classifier: 0.32
## Non-classification rate of the DD0 (max-depth) classifier: 0.0225
##
## Misclassification rate of the DD1 classifier: 0.12
## Non-classification rate of the DD1 classifier: 0.02
##
## Misclassification rate of the BB0 classifier: 0.2075
## Non-classification rate of the BB0 classifier: 0
##
## Misclassification rate of the BB1 classifier: 0.1675
## Non-classification rate of the BB1 classifier: 0
##
## Misclassification rate of the II0 classifier: 0.2275
## Non-classification rate of the II0 classifier: 0.26
##
## Misclassification rate of the II1 classifier: 0.21
## Non-classification rate of the II1 classifier: 0.26