outliers_by_iforest | R Documentation |
Spatial outliers based on the Isolation Forest algorithm implemented in the solitude package. IForest is a tree-based method used to determine nominal difference from normal values; it is not traditionally applied to spatial data, so this method is really just experimental. Threshold value defines the percentile to use for determining outlier status.
outliers_by_iforest(pts, thresh = 0.95, tension = 0.3, buffer_size = 0.05)
pts |
sf points |
thresh |
percentile value to use for determining outlier status |
tension |
(optional) value from 0 to 1 to control how tight polygon should wrap around points |
buffer_size |
(optional) buffer around exterior points, in coordinate units |
list with outlier status and sf polygon
Other outlier functions:
outliers_by_box()
,
outliers_by_circle()
,
outliers_by_cluster()
,
outliers_by_density()
,
outliers_by_polygon()
,
spatial_outliers()
data("pdx_breweries") pts <- pdx_breweries$geometry x <- outliers_by_iforest(pts) plot(pts) plot(pts[x[[1]]==-1], col="red", add=TRUE) plot(x[[2]], add=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.