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

Class Rule

source code


This is realizes an important part of the inference engine. It represents and calculates the value of a fuzzy rule and sets the given adjective to the appropriate value.

Instance Methods [hide private]
 
__init__(self, adjective, operator, certainty=1.0, CER=None)
Initialize instance.
source code
 
compute(self)
Compute and set value for given fuzzy adjective.
source code
 
getName(self, system)
Lookup the name given this rule in the given system
source code
string
__repr__(self)
Return representation of instance.
source code

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

Class Variables [hide private]
fuzzy.norm.Norm.Norm _CER = fuzzy.norm.Min.Min()
the default value (=Min()) for the norm used to calculate the certainty of a rule.
Instance Variables [hide private]
fuzzy.norm.Norm.Norm CER
fuzzy norm to use with certainty (normally a t-norm)
fuzzy.Adjective.Adjective adjective
fuzzy adjective to set
float certainty
how sure are we about this rule
fuzzy.operator.Operator.Operator operator
Operator which provides the value to set
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, adjective, operator, certainty=1.0, CER=None)
(Constructor)

source code 

Initialize instance.

Parameters:
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Return representation of instance.

Returns: string
representation of instance
Overrides: object.__repr__