| p_noise | R Documentation |
Assigns a quality score to each point labelled as noise (-1). Two
complementary sub-scores are computed and the element-wise minimum is taken
as the final score:
p_{\text{sparse}}Measures whether the noise point is sparser
(more peripheral in density) than the densest part of every real cluster.
For cluster c, let M_c be the maximum core distance over
all points in c. Then
p_{\text{sparse}}(i) =
\min_c \frac{\text{core}_k(i) - M_c}{\max(\text{core}_k(i),\, M_c)}.
p_{\text{far}}Measures whether the noise point is far from
every cluster in DC-distance space. For cluster c, let
d_{\min,c}(i) be the minimum DC distance from i to any
point in c. Then
p_{\text{far}}(i) =
\min_c \frac{d_{\min,c}(i) - M_c}{\max(d_{\min,c}(i),\, M_c)}.
Both sub-scores lie in [-1, 1]: positive means the noise point is
legitimately sparse/far; negative means it is denser/closer than the cluster
boundary and might be a misclassified inlier.
p_noise(X, labels, min_points = 5, dc_dists = NULL)
X |
A numeric matrix ( |
labels |
An integer vector of length |
min_points |
Positive integer |
dc_dists |
Optional precomputed |
A named list with two numeric vectors, each of length equal to the number of noise points:
Sparsity-based noise scores.
DC-distance-based noise scores.
disco_samples
set.seed(3)
X <- matrix(rnorm(60), ncol = 2) # 30 rows x 2 cols
labels <- c(rep(0L, 10), rep(1L, 10), rep(-1L, 10)) # 30 labels
nr <- p_noise(X, labels, min_points = 3)
str(nr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.