Skip to content

70Gage70/Kneedle.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kneedle.jl

Documentation Status

This is a Julia implementation of the Kneedle1 knee-finding algorithm. This detects "corners" (or "knees", "elbows", ...) in a dataset (x, y).

Features

  • Exports one main function kneedle with the ability to select the shape and number of knees to search for.
  • Built-in data smoothing from Loess.jl.
  • Makie extension for quick visualization.

Installation

This package is in the Julia General Registry. In the Julia REPL, run the following code and follow the prompts:

import Pkg
Pkg.add("Kneedle")

Access the functionality of the package in your code by including the following line:

using Kneedle

Quick Start

Find a knee automatically using kneedle(x, y):

using Kneedle
x, y = Testers.CONCAVE_INC
kr = kneedle(x, y) # kr is a `KneedleResult`
knees(kr) # [2], therefore a knee is detected at x = 2

In order to use the plotting functionality, a Makie backend is required. For this example, this amounts to including the line import CairoMakie. This provides access to the function viz(x, y, kr; kwargs...):

import CairoMakie
viz(x, y, kr, show_data_smoothed = false) # we didn't use any smoothing here, so no need to show it

"Plot"

Documentation

Documentation

See also

References

Footnotes

  1. 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.

About

The Kneedle knee-finding algorithm.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages