Tuesday, December 18, 2012

The two pilgrims (a pattern matching parable)

It came to pass that there were two pilgrims who arrived at the city seeking the one church of their faith. One traveler set off to search the city. The other traveler had a map of the city showing the relation between the church and one entrance to the city. There were only three city gates and he quickly found the one that matched his map, and set off directly to the church.

Sunday, December 9, 2012

How do we learn patterns?

Seems if I am going to consider patterns as (template matching + measurement) then, even if only briefly, the epistemological question needs to be considered of: where do these patterns come from. A quick consideration suggest at least two functionalities.
  1. A single pattern may be split into two patterns by noticing a new detail. 
  2. A collection of details, in a particular relation to each other, could be grouped as a single pattern
I know it is silly but I want to imagine a new-born starting with one big pattern for the world: there or not there. Perhaps the rest could develop from (1) and (2). 

Update: or two patterns might be seen to be similar, creating a new perception of details and a new generalization.

Update: One clear thing is that  known patterns can be further detailed.

Friday, December 7, 2012

Don't confuse between parameters and the structures they define

It is a routine mistake in pattern recognition to make measurements of an input and then judge the input by the distance of its measurements to those of an ideal, using comparison of the measurements in a flat Euclidean parameter space ("phase space"). When you hear people talking about a "feature vector", they are headed in that direction. The correct thing to do is to look at the structures defined by the measurements and quantify the differences between them. [So in this case the feature vector becomes a guide in the placement of a structure template.]

For example, suppose two positive real numbers a and b describe the shape of a rectangle independent of its size. Then comparing (a1/b1) to (a2/b2) is better than using sqrt( (a1-a2)^2 + (b1-b2)^2 ).
But that is the wrong approach. 
For example, suppose a and b describe a step with a tread of length a and a rise of length b. We can embed this step into a function space where we use the L2 metric to quantify distance, perhaps using a formula more like
(a2-a1)*(b2-b1)
But that is the wrong approach too, although it shows how different metrics makes sense in different contexts. 
Go back to the how the input was measured. (Sticking with rectangles) imagine fitting rectangles to the data and measuring the data as a rectangle. Suppose you wish to distinguish ideal pattern X from ideal pattern Y in this world of rectangles. X has an a1,b1 and Y has an a2/b2. So now we have new input data to be recognized and we do not bother to measure a and b for the data. Instead we fit a scaled version of X to the data versus fitting a scaled version of Y to the data. Which one is a better fit? That is simpler, cleaner and I think maybe a more effective pattern recognition method than vector algebra in a Euclidean space. 
A lot of the work I do like this uses if...else statements and compares the measured values to thresholds. Occasional you get fancy and look at a ratio or difference. It might be a real relief (and I plan to try it) to find a uniform approach that incorporates all those special relations - by virtue of the structures defined by the parameters rather than algebraic relations between the parameters. It is geometry not algebra.
Update:  A reason we do not think this through is because of the computational burden of fitting more complex shapes to data - there are no good formulas and, when you allow the data to include parameter changes, the calculation can quickly overwhelm a desktop computer. So you don't think about it. But between having an elegant formula (least squares best fit for lines) and an computationally exhausting search for best fit, there is another possibility: a hierarchical search that does coarse alignment using a coarse pattern and fine alignment using sub-patterns or "details" of the coarser one, in such a way that the search space is much smaller. Then you start realizing that there is no pattern "recognition". Instead you measurement tool comes along with an alignment method - a way to hold up the ruler to the data - that requires an alignment step to precede the measurement step. Instead of recognition, the alignment "template" fits or doesn't. The measurements that start from that template match either can be made or they cannot.

Wednesday, November 14, 2012

How about a pact between corporations and people?

...self policing, without government, and consumer approved?

It will never work if the Wallmart shopper dominates. 

Tuesday, November 13, 2012

Tree Fall from Hurricane Sandy

Lucky, I guess. It fell in every direction except towards the house.

Thursday, October 18, 2012

Expressing disappointment

This is about the  phrase "boom...aw...shitty" which came about like this:
On the 4th of July in Woods Hole we used to go out to Nobska to watch the Falmouth fireworks. You could see the fireworks but you were too far away to hear the explosion. Getting into the habit of supplying the sound artificially by saying "BOOM!", it was possible for the firework to be seen, shouted at, then be disappointed by, all in sequence. I guess the fireworks have gotten a lot better since then.

Wednesday, August 29, 2012

Differential Geometry without continuity or derivatives

A great deal can be accomplished using chi squared comparison to uniform distributions when we create distributions by projecting all data points, lying within a sphere, perpendicularly onto a plane through the origin of the sphere. We know how many points to expect in each cell if the points are uniformly distributed inside the sphere so
xhiS= sum { (measured - expected )^2/expected }
(over all cells)
measures the deviation from uniformity. It varies as we vary the projection direction. The direction with minimum xhiS serves as a surface normal. The direction of maximum xhiS is that of minimal curvature. Interesting eh?

I read that physicists and mathematicians are pursuing efforts to define space as foamy. It seems to me that the diverse possibilities of this xhiS metric (including the relation to the cell size, including the frangible concepts of "expected" within a sphere) make xhiS a good candidate for handling physical diversities. There could be multiple tangent planes, multiple curvatures, and a spectrum of ideas around the fact that minima and maxim of xhiS can be local rather than global. For example space around a point could be defined as "2D" if the tangent and minimum curvature are global extremes and there are no local extremes to confuse the issue.

Update:
However, space around a subatomic particle or around an atom might have multiple directions that were local minima/maxima. As such the dimension is in question. 

Update 2: Probably this all is nonsense. You would need to already be "in" 3D to measure the proposed dimension.  
Update 3: No, you could be in 3D, making direction dependent measurements there, and still uncover a higher dimension entity within your data.