This function computes an ensemble score by aggregating values above the mean as detailed in Aggarwal and Sathe (2015) <doi:10.1145/2830544.2830549>.

threshold_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 <- threshold_ensemble(Y) ens
#> [1] 0.53486001 0.00000000 0.36284270 0.42459603 1.43096065 0.47157447 #> [7] 1.67305105 0.10441304 0.86207172 0.94913485 0.00000000 0.46045823 #> [13] 0.00000000 1.50775890 0.29980424 0.16080411 1.22181211 2.81714469 #> [19] 1.61455075 0.00000000 0.00000000 0.68332183 0.73185509 0.11607296 #> [25] 1.64941928 0.40494699 0.45251184 0.46837381 0.10841674 2.23888860 #> [31] 1.78323028 1.57410480 1.32267124 0.66698272 0.40473800 1.60891540 #> [37] 0.44358775 0.62412190 0.72674597 1.08020930 0.00000000 1.29494608 #> [43] 1.34522910 1.79383741 1.06274225 1.13136117 0.79699852 0.00000000 #> [49] 0.42458719 0.45020426 1.12301690 0.55135037 1.48853450 0.07106881 #> [55] 0.89845585 0.90343292 2.10280026 0.00000000 0.54179578 0.65304581 #> [61] 0.54455289 1.00372088 1.87529119 0.00000000 1.56024163 0.37340619 #> [67] 0.61130739 0.07955107 0.33769288 2.21843060 0.00000000 3.06724430 #> [73] 1.67386165 0.76138001 0.70589232 1.40892603 0.91428723 0.54271357 #> [79] 1.44987679 0.91553616 0.18411616 0.43435596 0.74576075 0.55441651 #> [85] 1.44412585 0.54521176 0.00000000 0.57636038 1.48955324 0.00000000 #> [91] 1.59932620 0.51758794 0.64321608 0.10989213 1.43866533 2.17825517 #> [97] 1.24765885 1.54760963 1.81407035 0.00000000 0.10909625 0.51503601 #> [103] 0.00000000 0.96073008 1.07279170 0.58712318 2.03393564 0.66613775 #> [109] 0.00000000 1.81930118 1.05142615 0.00000000 2.78869367 0.54851753 #> [115] 1.31681393 0.00000000 0.75044588 0.64965401 1.10209759 0.51256281 #> [121] 1.53947778 0.00000000 0.00000000 0.51493156 0.53600144 0.00000000 #> [127] 1.14144984 0.34828362 0.10534677 0.82061119 1.75058727 1.27431395 #> [133] 1.36011992 0.08679524 2.16363725 1.72683750 2.46538952 0.58989871 #> [139] 0.71302827 0.33273452 0.00000000 1.29044077 2.03565459 0.00000000 #> [145] 0.37695138 1.15930610 0.07281845 1.06853984 1.37299388 1.12677645 #> [151] 0.50753769 1.52723878 0.65035398 0.45041605 0.41975695 0.73848441 #> [157] 0.16048194 0.94182539 2.63772715 2.10303180 1.18164657 1.07241311 #> [163] 1.11437843 2.63146357 0.12111654 1.42221154 0.12636553 0.00000000 #> [169] 0.00000000 0.52499963 1.76605664 0.19821642 0.56863417 0.91391502 #> [175] 1.13938557 0.00000000 0.85707667 0.41529251 1.12723220 1.12661486 #> [181] 0.15298189 0.11643207 0.94218501 1.31990059 1.74323176 0.11904308 #> [187] 1.01516618 1.31108292 1.37080870 1.86251825 0.46627827 1.43167180 #> [193] 1.52517402 0.92830895 0.76676096 0.36645990 1.37497348 0.50251256 #> [199] 5.34951990 7.00000000