Package fuzzy :: Package defuzzify :: Module Dict :: Class Dict
[hide private]
[frames] | no frames]

Class Dict

source code


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,
         ...
       }
}
Instance Methods [hide private]
 
__init__(self, *args, **keywords)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
getValue(self, variable)
no defuzzification just return membership values
source code

Inherited from Base.Base: __repr__, accumulate, value_table

Inherited from Base.Base (private): _repr_params

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from Base.Base (private): _ACC, _INF

Instance Variables [hide private]

Inherited from Base.Base: ACC, INF, accumulated_set, activated_sets

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **keywords)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • INF - inference norm, used with set of adjective and given value for it
  • ACC - norm for accumulation of set of adjectives
Overrides: object.__init__
(inherited documentation)

getValue(self, variable)

source code 

no defuzzification just return membership values

Overrides: Base.Base.getValue