Obtuse-Angle Shadowing Networks and Distance-Based Interpolation

Bad data is much more common than good data. Suppose that you have a set of scattered points in any or an unknown number of dimensions and that although you may not know their coordinates, you know how to calculate the distances between them. You can use this information to define an obtuse-angle shadowing network connecting nearby points in the set. If you have a function defined on this point set, you might use this network to define a distance-based interpolation function to estimate the function value for a new point of the same kind. Such networks and this kind of interpolation should have applications in various fields, for example, image processing and machine learning. This Demonstration applies obtuse-angle shadowing networks to small 2D point sets and also illustrates distance-based interpolation, assuming random function values at the points. The interpolated function is shown as a contour plot. You can change the function value at the green point.


This Demonstration illustrates obtuse-angle shadowing networks and distance-based interpolation; to make it visual, we use 2D points, which you can create (Alt+Click) and drag. Two points A and B in the network are NOT connected if there are two other points C and D such that C is connected to A, D is connected to B, and both the angles ACB and ADB are obtuse.
(Another possibility, not shown here, is to use directed connections: A is NOT connected to B if there exists another point C in the point set, such that C is connected to B and the angle ACB is obtuse.)
Further, two points in the network are not connected if the distance between them is zero or larger than twice the cutoff radius. The cutoff radius is an optional parameter, which you can vary. For small systems, the cutoff radius can be large or infinite, but for large systems we might get better speed and scaling properties by a smaller choice. With a hierarchical organization of the points, we could then avoid calculation and storage of the complete distance matrix. (That is not included in this Demonstration.)
Note the difference between this kind of network and Delaunay triangulation: here some of the points are only connected to one of the other points. Occasionally two connections might cross. We can estimate the dimensionality of the local environment to a given point by looking at the number of connected points. If you look at a random infinite network, you can estimate the number of connected neighbors:
The "Generate a new point set!" button generates a whole set of new random points and function values.
With the "no interpolation" button selected, you see just the obtuse-angle shadowing network connecting some random points. In this mode the response to changes in the point set is rapid.
When one of the interpolation buttons 0, 1, or 2 is selected, you see the interpolation function when random function values are assigned to the network points. You can change the function values one at a time with the two green dot sliders. The selected point is green. To keep updates fast, the settings of the contour plot sometimes show jagged curves.
The zeroth-order interpolated function is piecewise constant; it is essentially the average of the surrounding neighbor points.
The first-order interpolated function is continuous, but does not have a continuous derivative. The interpolation coefficients are always positive or strictly zero, so the interpolation always gives very "conservative" results, never beyond the control point values.
The second-order interpolated function has a continuous derivative, with interpolation coefficients that might be negative. This function is able to suggest positions for minima and maxima. To calculate the second-order interpolation, both the first level and the second level of connected points are used. The second level of connected points is calculated in the same way as the first level, just ignoring all first-level connections.
As with all interpolation functions, extrapolated values should be taken with many grains of salt.
These methods have probably been invented several times before, but I have not found any information about that in the easily available surface layer. Please inform me if you know! The programming is to be seen as "proof-of-principle", and I have tried to keep it simple. The algorithms could surely be improved in several aspects, especially the speed for a large number of points.
I find the simplicity and the generality of the methods attractive. One could think of different applications:
• Comparing DNA sequences
• Finding spell checking suggestions
• Finding contextually close words from word correlation analysis
• Organizing sets of color points, for example, to be able to do dithering with a finite number of colors
• Finding topological features of experimental datasets: interior, exterior, and connecting points, clusters, voids, etc.
• Optimization problems
• For use in machine learning as a complement to neural networks: just add relevant points to the network
• Organize datasets for Wolfram|Alpha and find connections in them
comments
 
Powered by Wolfram Mathematica
Give us your feedback
Give us your feedback

Source page:




 often  occasionally  never

Note: Please do not include anything you consider confidential or proprietary. Your message and contact information may be shared with the author of any specific Demonstration for which you give feedback, but will not otherwise be published or distributed.
Privacy Policy »

Note: To run this Demonstration you need the free
Mathematica Player
or Mathematica 7+
Download or upgrade to Mathematica Player 7
I already have Mathematica Player or Mathematica 7+