| Algorithm 1. ID-SVDD outlier detection | |
| Input: | Target dataset X = {x1, x2, …xi, i = 1, 2, …, n}, kernel function K(.) |
| Output: | αi, R, and r. |
| Begin | |
| Define an array P to store relative density weight for each point. | |
| for (k = 1; k ≤ n; k++) do | |
| calculate Pk = ρ(xk) according to Equation (12) | |
| End | |
| Solve the optimization problem of (8). | |
| Determine a sample whose αi is between 0 and ρ(xi)C. | |
| Calculate the radius R of sphere and the distance r according to Equations (3) and (4). | |
| End | |
| Returnαi, R and r. | |