outliers_by_iforest: Spatial outliers: IFOREST Method

View source: R/spaceout.R

outliers_by_iforestR Documentation

Spatial outliers: IFOREST Method

Description

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.

Usage

outliers_by_iforest(pts, thresh = 0.95, tension = 0.3, buffer_size = 0.05)

Arguments

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

Value

list with outlier status and sf polygon

See Also

Other outlier functions: outliers_by_box(), outliers_by_circle(), outliers_by_cluster(), outliers_by_density(), outliers_by_polygon(), spatial_outliers()

Examples

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)

nhoteling/spaceheater documentation built on Sept. 24, 2022, 3:04 p.m.