Prints a summary of the outlier detection results from remove.knn.outliers.
Usage
# S3 method for class 'knn.outliers'
print(x, ...)Examples
knn.res <- list(
S.q = matrix(c(0, 0,
1, 1,
2, 2), ncol = 2, byrow = TRUE),
y.q = c(1.0, 1.5, 2.0),
nn.d = matrix(c(0.2, 0.4,
0.3, 0.5,
1.4, 1.8,
0.25, 0.45),
ncol = 2, byrow = TRUE),
d.thld = 1,
idx = c(TRUE, TRUE, FALSE, TRUE),
n.outliers = 1L,
method = "qf"
)
class(knn.res) <- "knn.outliers"
knn.res
#> k-Nearest Neighbor Outlier Detection Results
#> ============================================
#> Method: qf
#> Original observations: 4
#> Outliers detected: 1 (25.0%)
#> Observations retained: 3 (75.0%)
#> Distance threshold: 1