kneePoint | R Documentation |
This function calculates the knee/elbow point of a curve based on the kneedle algorithm (satopaa et al, 2011). This is used internally in 'moleculaR::.calcGaussBW'. This is a simplified implementation.
kneePoint(
x,
y,
df = 7,
xQuery = seq(range(x)[1], range(x)[2], 0.1),
plot = FALSE,
sign = +1,
...
)
sign |
+1 for increasing values (knee) and -1 for decreasing values (elbow). |
x: |
x values representing the bandwidth values |
y: |
y values representing the Moran's I statistic. |
df: |
degrees of freedom for the smoothing spline. |
plot: |
whether to plot the result. |
xQuery: |
x values to be used for smoothing the original curve via a fitted spline. |
...: |
arguments passed to 'plot'. |
Returns a numeric, the calculated knee point representing the optimum bandwidth.
Satopaa, Ville, et al. "Finding a" kneedle" in a haystack: Detecting knee points in system behavior." 2011 31st international conference on distributed computing systems workshops. IEEE, 2011. (doi: 10.1109/ICDCSW.2011.20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.