fuzzy.defuzzify.Dict
index
/fuzzy/defuzzify/Dict.py @ Get pyfuzzy at SourceForge.net. Fast, secure and Free Open Source software downloads

Not a real defuzzification.
Just stores the adjective memberships in a dictionary for output.

 
Classes
       
fuzzy.defuzzify.Base.Base(__builtin__.object)
Dict

 
class Dict(fuzzy.defuzzify.Base.Base)
    Not a real defuzzification.
Just stores the adjective memberships
in a dictionary for output.
You should use in the adjectives instances of Set itself.
 
What can be done with this?
 
For example:
 
You want help with buying a car.
 
Input are your preferences::
 speed, payload (1-10), ...
(map to "very important, important, doesn't matter, not wanted, never" ;-)
 
Output are choices:
cars with adjectives: ferrari, truck, ...
 
rules are as follows::
 if speed->very_important && payload->never then car->ferrari
 if payload->very_important then car->truck
... and so on
 
Then you use this as follows::
 input variables 
 { speed:3, payload:1, ...} 
 ==> 
 output_variables
 { car: {
          ferrari:0.1,
          truck: 1.0,
          ...
        }
 }
 
 
Method resolution order:
Dict
fuzzy.defuzzify.Base.Base
__builtin__.object

Methods defined here:
__init__(self, *args, **keywords)
getValue(self, variable)
no defuzzification just return membership values

Methods inherited from fuzzy.defuzzify.Base.Base:
__repr__(self)
Return representation of instance.
        
@return: representation of instance
@rtype: string
accumulate(self, variable, segment_size=None)
combining adjective values into one set
value_table(self, set)
get a value table of the polygon representation

Data descriptors inherited from fuzzy.defuzzify.Base.Base:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        __revision__ = '$Id: Dict.py,v 1.9 2010-03-28 18:40:33 rliebscher Exp $'