Saturday, December 22, 2012

Pattern Axioms

I have been fooling with a new way to locate and recognize objects that assumes a concept of "pattern" where every pattern has 
  • a frame of reference attachment method given any point of the data
  • one or more measurements made within that frame of reference
  • a set of idealized object or models, parametrized and positioned in the data space by those measurements.
  • a distance metric between points in the data space
Here is how it works, given a data point. 
  1. Attach the frame of reference
  2. Make the measurements, use them to find and locate one or more models
  3. Find the one model closest to the data. 
In this framework the models become methods of attachment for more detailed measurements, and thereby exist in a hierarchy as nodes in a tree.

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.

Thursday, July 19, 2012

Dimensionality of the universe

I cannot imagine why this is a question. There is no physical evidence of three spatial dimensions - no matter how many rulers and clocks you choose to hold in my face as evidence. That would be mistaking your behavior for a physical reality. On the other hand, actions do have dimensions, so there is nothing lost in spite of the criticism.

Update: In terms of the dimension defined by xhiS (in a later post), it is meaningful to ask about things like the dimension of the space around an atom, without having a built-in 3D assumption.

Sunday, May 20, 2012

Red shift could be caused by rotation rather than expansion

Anything that causes the shortest path between entities to lengthen will case a red shift. Expansion, where the entities are accelerating away from each other is only one way to lengthen such paths. Another way is for the entities to be on spinning a merry-go-round.

Saturday, May 19, 2012

The definition of information, the definition of "life"

This is philosophy of universe week. So to start the ball rolling:

I think a theoretical physics that fails to subsume theoretical biology must be incomplete. The idea that somehow causality is suspended for that brief moment where "life is created" is just not scientific. Nor, for that matter, would a Deus Ex Machina make any more sense for the big bang "universe is created" moment. One thing at a time though.

Grant me the concept of a clock and here is a definition of information: a sequence of increases and decreases of frequency.

Grant me that definition and here is a definition of life: the preservation and perpetuation of information.

So here is that theological moment: the previous two posts on this blog outline a theoretical physics based on information such that the universe is populated entirely with objects interacting based on the information they maintain. According to this post here, that means life never starts, it is simply the stuff of the universe at different levels of complexity. For the benefit of a colleague at work who was using the word "consciousness", let's agree that everything is conscious of itself and its interactions and that collective conscious is possible.

Properties of a universal simulator

This is a long-term discussion with my eldest son about creating C++ objects that simulate or model the behavior of real world objects. The base class is required to have certain properties:
  • It can "contain" other simulation objects
  • It exposes one or more sequences of frequencies
  • It maintains a clock with an update() method called once per tick, and sent to each of its contained simulations.
  • the contained simulations must run their clocks in synch with the containing object's clock

A goal is to be able to populate a program with objects by declaring/initializing them, and then have the objects freely interact. But what is a "freely interact" supposed to be like when the classes do not know about each other and the programmer (me or you) does not have access to the header file definitions of the classes in use.

So what is a universal language of interaction? The only answer I can come up with is that when exposed frequencies "match" (in the clock of a containing parent class) energy can be exchanged and some kind of communication can occur between interactors. According to yesterday's post, such a "red-shift event"/interaction would need to generate a new class instance (a new "particle") with the frequency difference of the interactors - spun off as an offspring of the harmony.

I guess I don't want you to think I am another crazed mathematician. But I believe there is almost enough here to start creating prototype simulation class definitions, working programs, and some kind of approach to theoretical physics.

Friday, May 18, 2012

A physics of information and red shift

This is not a new topic and I know other people are trying to base a theoretical physics on the notion of information rather than the (tired) ideas of "mass" and "energy". My son and I have been going over it for years. Today I was talking with a colleague at work about how there is still something missing if all you have is information. There is something else needed for the theory. Which reminded me of a different conversation I have been having with my son about resonant frequencies between pairs of particles and how they can exchange information/energy if their frequencies are nearly matched. So a particle with frequency .99 and one of 1.0 could resonate but (according to my son) a 0.01 particle would have to be produced. As the first two particles resonate and experience harmony, they produce an offspring particle. The process is a red-shift event.

This red-shift event defines a spatial component between the two particles and I want to say it should be regarded as happening with a certain probability. One last crazy statement is that probably there still needs to be an observed/observer relation in their to cause probabilities to materialize into facts.

[Another discussion with my son that has been going on for years is about the class definition of a universal simulator.]

Sunday, April 8, 2012

Ratio of chord length to arch length

Here is another "math-y" little thing from work, that reminds me of the "associated function" of Bill Pohl:
Given two points on a curve in space, we can compare the length of the straight line ("chord") between the points to the length of the curve ("arc") between the points. For a fixed chord length, the ratio of chordlength to arclength has a minimum value. Consider this minimum value as a function of the given chord length. So
F(d) = minimum { d/ archlength }
where the ratio is minimized over all pairs of points d apart. Equivalently
F( d ) = d/ max{ archlength }
calculated over all pairs of points on the curve, d-apart from each other.

For the circle,
F(d)=d/arcsin(d)
For the square of side length 1,
F(d) is sqrt(2)/2 for d <1and jumps to 1/3 at d=1, and descends from there back to sqrt(2)/2.
A lot like the associated function of the square.

Lots of obvious math questions around the relation of this F( ) to the associated function, around the relation of this F() to the isoperimetric inequalities, around geodesics. My interest, is related to measuring the possibility of taking a short-cut, all in a "lava lamp" sort of way - meaning when the curve gets too close to itself, change it to take a short cut.

Thursday, March 22, 2012

To a math friend

I have been having the darnedest fun trying to understand geodesics on the surface z=x^2 + y^2. It turns out I got all the way through graduate school, including courses in differential geometry, without realizing that the book examples were cooked up to be do-able and that, for the most part, even simple expressions lead to unanswerable questions. For example you study curves using "arc-length" parametrization when, in simple cases like (t, t^2, t^3), the arc-length parametrization cannot be found easily.

Anyway, the geodesics on z=x^2 + y^2 that do not go through (0,0,0) can only spiral outward and will always have an infinite number of windings around the z axis. I don't know why it took a couple months to realize a geodesic cannot spiral inward without its curvature exceeding that of the surface and its velocity vector is always turning more in the horizontal direction than in the vertical direction - so it integrates faster in theta than in z - guaranteeing a winding. The lemma is that geodesic's velocity vector will always turn toward the direction of greatest bending of the surface.

Also, I find it interesting that winding number is a topological property of the geodesics but not of the surfaces. You can deform a surface just slightly and change the winding numbers dramatically. The lemma suggest other things to look at, like z=a*x^2+b*y^2 where the greatest amount of bending can be a horizontal direction in some places and vertical direction in others.

Anyway, lots of fun.

Saturday, March 17, 2012

There was a hummingbird

I held up my hand and
it flew
tight spirals around it
landed, and started pecking my finger
with its bill like a needle

Friday, February 24, 2012

Geodesics on z = F(x,y)

Here is a question about geodesics on the surface of the graph of
z = x^2 + y^2:
Excluding the case of geodesics that pass through x=y=0, do geodesics spiral towards or away from the point x=y=0 ? Or do they have a zero winding number about the z axis - remaining to one side?
Answer: Any geodesic on this surface spirals away from zero but not towards it.There is a lemma: For any unit tangent and normal at a point on a surface, the plane through the point containing the tangent and normal cuts the surface in an arc through the point with curvature that matches the curvature of any geodesic with that same tangent vector through the point. In other words the arc cut by this plane is representative of the geodesic.

On the surface
z = x^2 + y^2 , as we get near 0, the radius of curvature of all such plane-cut-arcs approaches a constant. But a spiral getting closer to x=y=0 has curvature approaching infinity, so it could never be a geodesic without violating the lemma.
I still have no answer for the winding number question. Do all geodesics not through x=y=0 have a self crossing?

The latter question has me stumped but is lots of fun to think about. It is a growth rate question.

Update: Good news! The geodesics spiral outward on the parabaloid because of another simple lemma: On a geodesic, the tangent vector always turns more in the direction of greatest curvature. So for a horizontal tangent vector on
z = x^2 + y^2, it will be turned in the horizontal more than in the vertical so the moving point moves horizontally faster than vertically. So you run out of angular dimension (<=2pi) long before you run out of vertical dimension (infinite).

Tuesday, January 31, 2012

Attacked by Adobe Flash Player Installer

This is my blog so I will just quietly mention that my computer had some serious problem booting just now, and when I had allowed Microsoft's utilities to complete the effort of recovery, the Adobe Flash Player - Installer dialog was sitting open, smack in the middle of the screen. I have no doubt at all that that is why my computer had trouble booting and, I am sorry, but this seems no better than a virus attack by Adobe. How did they get access to something that could cause me the boot up hassles? What if I was frightened by the experience of my computer not starting?

Thursday, January 19, 2012

Some random carvings

A wood duck (acrylic on cedar)Truffle (oak)
A mother porpoise with baby (Catlinite pipe stone):

Friday, January 6, 2012

Too bad Moleman is un-readable

I am in the process of pasting typed words over the poor handwriting and cramped space that makes my Moleman comic book un-readable. I hope the whole thing gets revised.