HyperKnee Finder
This tool will found the optimal values for two inter-dependant parameters using the well known knee/elbow method.
The method prescribe to search for the point where the curvature is at the maximum (Here an example).
A more formal definition (from Satopää, Albrecht, Irwin, and Raghavan, 2011, p.1) states that the knee/elbow point is the point after which:
relative costs to increase [or decrease, NdC] some tunable parameter is no longer worth the corresponding performance benefit
While usually this method is used for tuning one single parameter, nothing impeach to the same for multiple, inter-dependant parameters. This tool is anyway able to find the optimal value only for two parameters.
In facts, HyperKnee Finder is a 2-d generalisation of the KneeFinder tool.
Motivations for HyperKnee Finder
In many situations the parameters of an algorithm depends on each other. What you usually do is to ignore this dependency, and so you optimise the first parameter, then you use the found value to optimise the second parameter.
Acting like this, in general, does not guarantee you to land on the optimal combination for the two parameters.
Indeed, you have to evaluate all the possible combination of the two parameters, and at that point you can make your choice.
Examples
The following example show how to find the HyperKnee point in a double exponential decay.
from hyperkneefinder import HyperKneeFinder
import numpy as np
%matplotlib ipympl
#double exponential decay plus noise, clipped
X = np.arange(1, 8, 0.1)
Y = np.arange(6, 10, 0.1)
Z = np.zeros((len(X), len(Y)))
for i in range(len(X)):
for j in range(len(Y)):
Z[i, j] = np.exp(-X[i]/3) + np.exp(-(Y[j]-5)) + np.random.rand()/45
Z = np.clip(Z, a_min= 0.5, a_max=2)
hkf= HyperKneeFinder(X, Y, Z, name_x='parameter_1', name_y='parameter_2', clean_data=True, clean_threshold=0.8)
hkf.visualise_hyperknee()
Also with different pseudo-convexity:
X = np.arange(1, 8, 0.1)
Y = np.arange(6, 10, 0.1)
Z = np.zeros((len(X), len(Y)))
for i in range(len(X)):
for j in range(len(Y)):
Z[i, j] = np.exp(-2/X[i]) + np.exp(-3/(Y[j]-5)) # + np.random.rand()/15
Z = np.clip(Z, a_min= 0, a_max=1)
hkf= HyperKneeFinder(X, Y, Z, name_x='parameter_1', name_y='parameter_2', clean_data=True, clean_threshold=0.8)
hkf.visualise_hyperknee()
Metadata
Release files for HyperkneeFinder 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| HyperkneeFinder-0.0.3.tar.gz | 10.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| HyperkneeFinder-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.5 kB
Release files / HyperkneeFinder-0.0.3.tar.gz
| Download URL | HyperkneeFinder-0.0.3.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f543a7c51d4ed17845b10accc452866e152154f04fa4d34d76e881de9696b1b
|
|
BLAKE2b-256 checksum How to use checksums |
bf4d3fa597cf8a9d7474c859718887ee1ab0f90bf6e200edd25c801cc500543e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / HyperkneeFinder-0.0.3-py3-none-any.whl
| Download URL | HyperkneeFinder-0.0.3-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02521b862ec79fe64a34492667d38792dcfd2c3b47bbe586349ec112db95e178
|
|
BLAKE2b-256 checksum How to use checksums |
3c2c8d26c2c58fb2a4b1db9e878701a19ab349f45c7459d8746fde31e126d7c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|