Research Article

Application of the Variable Precision Rough Sets Model to Estimate the Outlier Probability of Each Element

Algorithm 2

Pseudo-code of the BUILD_μ_OUTLIER_REGION algorithm.
BUILD_μ_OUTLIER_REGION (U, X, R): {M, ExcepDegree}
    Pseudo-code                                Comments
1     for each                       For each element of the universe
2      for each                          For each equiv. relation
3       class = CLASSIFY-ELEMENT(U, r, e) o       Obtain the equiv. class of the element
4       λ[e][r] = min(c(class, X), 1-c(class, X))  Obtain the lowest β higher than all values of M[e][r]
5       M[e][r] = {[0, λ[e][r])}           Obtain the β for which the element belongs to r
6     h = 1.0
7     prev = 0.0
8     for each inf ∈ SORT(λ[e])                  For each infimum in the order
9      base = {}                         Obtain β ranges of height m
10   ExcepDegree[e] = ExcepDegree [e] ∪ {[prev, inf) × [0, h]}    Obtain the outlier rectangle
11   prev = inf                   Save the value to form the next rectangle
12                      Reduce the outlier rectangle height
13  return <M, ExcepDegree>                   Return M and ExcepDegree