This function computes an ensemble score using inverse cluster weighted averaging in the paper titled A Study on Anomaly Detection Ensembles by Chiang et al (2017) <doi:10.1016/j.jal.2016.12.002>. The ensemble is detailed in Algorithm 2.

icwa_ensemble(X)

Arguments

X

The input data containing the outlier scores in a dataframe, matrix or tibble format. Rows contain observations and columns contain outlier detection methods.

Value

The ensemble scores.

Examples

set.seed(123) X <- data.frame(x1 = rnorm(200), x2 = rnorm(200)) X[199, ] <- c(4, 4) X[200, ] <- c(-3, 5) y1 <- DDoutlier::KNN_AGG(X) y2 <- DDoutlier::LOF(X) y3 <- DDoutlier::COF(X) y4 <- DDoutlier::INFLO(X) y5 <- DDoutlier::KDEOS(X) y6 <- DDoutlier::LDF(X) y7 <- DDoutlier::LDOF(X) Y <- cbind.data.frame(y1, y2, y3, y4, y5, y6, y7) ens <- icwa_ensemble(Y) ens
#> [1] 0.2984017 0.1474724 0.3162205 0.3575256 0.5784819 0.2893921 0.5601882 #> [8] 0.2642426 0.4005920 0.4336082 0.1989084 0.3776485 0.2533085 0.7184274 #> [15] 0.3305149 0.1790170 0.5308307 0.6145104 0.4242688 0.1951550 0.1526208 #> [22] 0.3624647 0.4329588 0.1892668 0.5190386 0.3059782 0.2306428 0.3395152 #> [29] 0.3283243 0.5221481 0.4668419 0.7532087 0.5926586 0.3150782 0.4333711 #> [36] 0.4546801 0.3998347 0.3674592 0.3606262 0.6191482 0.2184349 0.5517404 #> [43] 0.4591405 0.4854180 0.4572391 0.3502523 0.4140666 0.1977982 0.2853252 #> [50] 0.4093695 0.5433626 0.2857319 0.5724372 0.3738886 0.4311679 0.4323956 #> [57] 0.5587531 0.2586122 0.2313917 0.3432559 0.3733067 0.3950847 0.8907371 #> [64] 0.1625361 0.4546718 0.3149701 0.3385007 0.2279790 0.3293202 0.5679004 #> [71] 0.2758947 0.6257106 0.5794808 0.4447307 0.4082644 0.4339199 0.6223548 #> [78] 0.3772382 0.6171636 0.4524206 0.1820879 0.2296722 0.5133949 0.3226113 #> [85] 0.6919480 0.2488744 0.2447469 0.3002745 0.5436431 0.1667099 0.4923140 #> [92] 0.3576043 0.4096595 0.2809318 0.4259464 0.5668968 0.4941426 0.4098861 #> [99] 0.8579483 0.1733540 0.1706616 0.3826850 0.2754487 0.4716162 0.5103239 #> [106] 0.4639653 0.5310670 0.4070124 0.2867689 0.4854049 0.4741359 0.2192497 #> [113] 0.5916986 0.3238037 0.5797584 0.3087753 0.2575083 0.4165638 0.3963959 #> [120] 0.3675753 0.6195849 0.2283865 0.1454108 0.3232322 0.2735712 0.2161866 #> [127] 0.5544528 0.3514245 0.2206479 0.4529086 0.4329320 0.4715421 0.6195777 #> [134] 0.3311621 0.5472014 0.4542173 0.5504313 0.3511926 0.3172085 0.3723257 #> [141] 0.2863040 0.5997417 0.5200192 0.1591867 0.2927265 0.3599182 0.2231175 #> [148] 0.5193811 0.3987493 0.5527253 0.3537292 0.4195579 0.3305126 0.3209677 #> [155] 0.3535630 0.3765818 0.3589445 0.5644360 0.5827117 0.5233255 0.4719681 #> [162] 0.5634037 0.5487406 0.5914606 0.2987574 0.6165895 0.3564860 0.2681686 #> [169] 0.3211997 0.2626514 0.4534666 0.1595197 0.4751317 0.4031873 0.5361239 #> [176] 0.1364591 0.4190722 0.2305157 0.5449031 0.3415213 0.2663896 0.2267752 #> [183] 0.6648894 0.6055884 0.7482413 0.1638324 0.5217741 0.4746169 0.5867927 #> [190] 0.5854287 0.4754443 0.5126020 0.5946142 0.5096087 0.3890848 0.1856908 #> [197] 0.5678452 0.3438139 0.7925278 0.9230769