Monday, January 12, 2009

Fuzzy

I an earlier post I mentioned fuzzy logic (hereafter FL) and membership functions. Once I heard of Fuzzy, I was hooked. In normal logic, there are only two possible values; 0 for false and 1 for true. This boring, yet mathematically simple logic is usually called crisp. In FL a value can have any value bounded by 0 and 1 -- again false and true.


The glory of FL is that most real-world values are not either true or false. Let's give an example. Assume that we are talking about the height of a person. If a person is over 6 feet tall, he is”tall,” yet if he is less than 6 feet tall he is “short.” WTF? Would you honestly call someone 5-foot 10 short? Certainly not.


Let's put the same example in a FL. Let's say that over 7 feet is tall and less than 4 feet is short (the extremes will soon become clear). These are limits that we can pretty well agree on, but we can extend the definitions by a modifier – these are called hedges. Let's say a person is 5'10”, we'd say he was pretty tall and a person is 5 feet, we'd say that he is pretty small. If a person is 6'6”, he is very tall, and 4'6” is very small. FL allows us to assign a numerical value between 0 and 1 for these heights; very tall at 0.9, pretty tall at 0.75, pretty small at 0.25 and very small at 0.1. If we extend the example to one of weight, we could have a FL value, between for a person who is pretty small and very heavy. This could be used in models or expressions.


Another neat thing about FL is the concepts of sets. I watched Wall-E recently and there is a scene early in the movie when he is sorting his loot for the day. He has a spork and has an existential crisis because it isn't a spoon and it isn't a fork. He (?-- he could be a butch Fembot) ends up putting the spork between the cup of forks and the cup of spoons. It is interesting, but linguistically or neurologically we have a good idea of what we are talking about when we say, for example, vehicle (a set called vehicle). We say that a car is a vehicle and a truck is a vehicle. But what about a scooter or a segway or a horse? If vehicle is the set, a case can be made that all of the above examples are vehicles, in that they are devices that are used to move people from place to place. Let's say that the prototype or archetype vehicle is a car. It has a membership value in the set of 1. A truck is also used to move people, but it is also used to move crap, so it has a lesser membership value, say 0.75, or in Alabama, where everyone (it seems) who doesn't drive an SUV drives a pickup, is 0.9. This continues down to the point of scooter and horse. These two are marginal vehicles with scooter (.05) more of a vehicle because it is mechanical and a horse (0.02) less of a vehicle because it is biological (and less intelligent, arguably than a segway).


What about Wall-E? The spork, I think that we all can agree, has a 0.5 membership in set fork and a 0.5 membership in set spoon. In crisp logic, it is NOT a member of the set spoon and not a member of the set fork.


It really pissed me off in the 2000 elections when people talked about Fuzzy Math or Fuzzy Numbers when they claimed their opponent didn't know what they were talking about. As I think I might have made the case, these are fuzzy is a legitimate way of talking about logic and math.

No comments:

Post a Comment