AddOutlier {rsvddpd} | R Documentation |
AddOutlier
returns a matrix with outliers randomly added to a matrix
given certain proportion of contamination
AddOutlier(X, proportion, value, seed = NULL, method = "element")
X |
|
proportion |
|
value |
|
seed |
|
method |
|
A matrix
with elements / rows / columns contaminated.
Due to randomization, it is possible that the none of the entries of the matrix become contaminated. In that case, it is recommended to use different seed value.
X = matrix(1:20, nrow = 4, ncol = 5)
AddOutlier(X, 0.5, 10, seed = 1234)