elbow_point: Compute Elbow Point

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/elbow_point.R

Description

elbow_point computes the elbow point based on the maximum distance between each point and the line passing through the end points.

Usage

1

Arguments

x

A numeric vector

y

A numeric vector

Value

A list with the index (idx), x-value (x) and y-value (y) of the elbow point.

Author(s)

Joshua French and Mohammad Meysami

References

https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line

See Also

optimal_ubpop

Examples

1
2
3
4
5
6
# generate some data
x = c(0, 0.5, 1)
y = c(1, 0.1, 0)
# plot data (the second point is clearly the elbow)
plot(x, y)
elbow_point(x, y)

smerc documentation built on Oct. 1, 2021, 5:07 p.m.