This function computes an ensemble score using the maximum score for each observation as detailed in Aggarwal and Sathe (2015) <doi:10.1145/2830544.2830549>.

max_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 <- max_ensemble(Y) ens
#> [1] 0.4824121 0.1843885 0.4723618 0.4245960 0.6030151 0.4371859 0.7788945 #> [8] 0.3216080 0.6180905 0.8418571 0.2847566 0.4020101 0.3366834 0.8944724 #> [15] 0.3618090 0.2663317 0.5577889 0.9849246 0.6482412 0.2321253 0.1805080 #> [22] 0.4765659 0.6582915 0.2335631 0.7638191 0.3161958 0.4525118 0.4683738 #> [29] 0.4271357 0.8291457 0.7939698 0.8705872 0.9145729 0.4550387 0.4773869 #> [36] 0.7386935 0.4435878 0.5181921 0.7267460 0.9748744 0.2534985 0.5979899 #> [43] 0.7135678 0.8592965 0.6934673 0.5728643 0.7969985 0.2428372 0.4245872 #> [50] 0.4502043 0.5829146 0.5513504 0.6331658 0.4874372 0.6633166 0.6381910 #> [57] 0.8894472 0.2512563 0.3925861 0.5778894 0.5445529 0.5326633 0.9556932 #> [64] 0.2261322 0.7839196 0.4924623 0.4860508 0.3467337 0.3376929 0.9497487 #> [71] 0.3015075 0.9798995 0.9396985 0.6532663 0.5678392 0.5276382 0.9142872 #> [78] 0.5427136 0.8743719 0.7955290 0.2261307 0.2976067 0.6387257 0.4442982 #> [85] 0.8813118 0.4301861 0.2436648 0.4522613 0.7125962 0.2632777 0.8241206 #> [92] 0.5175879 0.6432161 0.3115578 0.7587940 0.6281407 0.9246231 0.7085427 #> [99] 1.0000000 0.2484718 0.2461681 0.3958406 0.2822462 0.6683417 0.8341709 #> [106] 0.4707032 0.8793970 0.4623116 0.3718593 0.8492462 0.7487437 0.2778010 #> [113] 0.9547739 0.5485175 0.6834171 0.3165829 0.3954625 0.5929648 0.6231156 #> [120] 0.5125628 0.8693467 0.2459346 0.2423738 0.4065936 0.4120603 0.2357256 #> [127] 0.7537688 0.3567839 0.2331899 0.5630866 0.6884422 0.8040201 0.7437186 #> [134] 0.4673367 0.9095477 0.7889447 0.8844221 0.4109166 0.5527638 0.4321608 #> [141] 0.2964824 0.9346734 0.8391960 0.2769581 0.3098454 0.5376884 0.2893679 #> [148] 0.6080402 0.6984925 0.8542714 0.5075377 0.7236181 0.5445529 0.3969849 #> [155] 0.3919598 0.7384844 0.4221106 0.9418254 0.9648241 0.8994975 0.6783920 #> [162] 0.9447236 0.8643216 0.9949749 0.3266332 0.8442211 0.4422111 0.2881917 #> [169] 0.3768844 0.5249996 0.7738693 0.1875641 0.5686342 0.7286432 0.8190955 #> [176] 0.1818564 0.5477387 0.4152925 0.6733668 0.5226131 0.2864322 0.2875074 #> [183] 0.9421850 0.9698492 0.9597990 0.1914317 0.7989950 0.7185930 0.7336683 #> [190] 0.6130653 0.4974874 0.9045226 0.9296482 0.8090452 0.5879397 0.2814070 #> [197] 0.7688442 0.5025126 0.9899497 1.0000000