Suppose that we have the following look up table
| 1.23 2.63 4.74 6.43 5.64
-------|--------------------------------------
-------|--------------------------------------
2.56 | 0 0 1 0 1
4.79 | 0 1 1 1 0
6.21 | 1 0 0 0 0
This table contains a labeling matrix (having only 0
and 1
s), x
values and y
values. How one can have nearest-neighbor interpolation for this look up table?
Example:
Input: (5.1, 4.9)
Output: 1
Input: (3.54, 6.9)
Output: 0
scipy.interpolate.NearestNDInterpolator
. However, I was wondering how good and efficient it is for my problem. – Vaios