cluster_em_outlier(x, k, method=c("reg","rcm","kotz"),eps = 0.01,iter_max=100)
It is essential to use robust Spatial EM for outlier detection, otherwise model estimation is distorted with presence of outliers and hence the outlier detection easily suffers masking and swamping effects (false negative and false positive errors).
## Not run:
# x1 <- matrix(rnorm(2*200),ncol=2)
# x2 <- matrix(rnorm(2*200,2,1),ncol=2)
# x3 <- matrix(c(rnorm(20,3,1),rnorm(20,-3,1)),ncol=2, byrow=FALSE)
# x <- rbind(x1,x2,x3)
# k<-2
# cluster_em_outlier(x,k,"rcm")
# ## End(Not run)
Run the code above in your browser using DataLab