Archive

Archive for March, 2010

Forest Fires and Banks

March 4, 2010 Leave a comment

Essentially, all models are wrong, but some are useful. — Box, George E. P

I was watching a show on discovery a while back, and they were talking a lot about the complexity involved in the human genome.  It turned out, that the human genome contained an estimated 30,000 genes, while some species of plant contained roughly the same amount of genetic material.  This raises an interesting question; if both species have the same amount of genetic material, how can we explain why humanity is so much more complex then a plant.

Lets take a look at another example, the stock market.  The rules governing the actions of an individual investor seem rather trivial.  He will try to invest when he thinks the market is low, he will try to sell when he thinks the market is high.  One plausible attempt at understanding the stock market, is to attempt to understand the agents which compose the stock market.  In the case of complex adaptive systems, this idea quickly falls apart because the agents have very complex interactions with each other; a large number of investors selling at the same time can cause the market to crash.  Intuitively, you would expect low prices to mean people would start buying, but that is not always the case.  Humans may also panic.

This brings up the concept of self organized criticality.  These systems, like the stock market, usually have a point at which the behavior of the system as a whole changes drastically; this is called a point attractor.  We can see self organized criticality in action in the below example.

In this model, we start with a 1000×1000 grid of dirt.  Every time step, each dirt node has a chance to be turned into a tree, and every tree node has a chance of being turned into fire; this simulates a lightning strike.  After a certain amount of time, the fire nodes return to dirt.  The point attractor in this system is defined in terms of the ratio of growth rate by the chance of being turned into fire (lightning striking).  If the growth rate is low, and the lightning strike rate is high, then enough trees do not get to grow to see the cascading failure we notice above.  If we have too few lightning strikes, and too high a growth rate, then we see a cascade failure, just like in the above example.

This model is actually more useful then the obvious example; then one where you predict when a forest is getting too thick and preemptively burn parts of it to the ground.  The forest fire model happens to be a relatively close model to cascading systems, like banks.

Lets go back to my first question; how do we explain the complexity of humans compared to plants, while some plants have approximately the same amount of genetic material?  We explain it the same way we explain the complexity of the forest fire model.  In the documentary they mentioned that some genes behave like switches, turning off segments of genetic material; genes have cause effect relationships on each other.  This leads to the possibility that the whole is bigger then the sum of the parts.

Advertisements
Categories: School Tags:

Interfaces and you

March 4, 2010 Leave a comment

As you all know, I’m working on engineering a computational ethnography tool known as scibrowser. The problem is, I have any one of a number of databases I need to support; I need changes to the database side to not affect much of the main program.

Metrics Class Diagram

Consider the above image. IQuery is an abstraction, an interface, which defines which methods the IQuery classes must implement. This common interface will have methods which fetches the stuff from the database our metrics class needs to calculate its stuff. This means our metrics methods are dependant on the abstract interface, not the actual databases. So now, pretend we have to support a new database. With this model, we no longer have to modify our metrics class at all; we never have to touch it. We simply have to add a new Object which implements the IQuery interface, and pass it to the metrics class in the form of a parameter.

The proper term for this is coupling and cohesion. A highly coupled class has a lot of dependencies, which makes extending functionality a real pain. A class that is not cohesive is one which has too many responsibilities. This basic principle helps with both of these, by reducing dependencies to one abstraction, and reducing the amount of extra, non related stuff we are forced to put into metrics to attempt to support one of a number of different databases.

Categories: Research Tags: