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

Class System

source code


Holds all stuff together. (variables, rules, ...) Provides methods to do calculation with it.

Instance Methods [hide private]
 
__init__(self, description='', variables=None, rules=None)
Constructor.
source code
 
reset(self)
Reset all memberships for the next run of calculate
source code
 
fuzzify(self, input)
Fuzzify the inputs.
source code
 
inference(self)
Calculate the fuzzy inference given by the rules.
source code
 
defuzzify(self, output)
Defuzzyfy the variables.
source code
 
calculate(self, input, output)
Do a complete fuzzy calculation step.
source code
 
findVariableName(self, var)
Find name of variable in this system
source code
 
findAdjectiveName(self, adj)
Find name of adjective (and variable) in this system
source code
 
findRuleName(self, _rule)
Find name of rule in this 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__

Instance Variables [hide private]
string description
description
{string:fuzzy.Rule.Rule} rules
dictionary to hold all rules.
{string:fuzzy.Variable.Variable} variables
dictionary to hold all variables.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, description='', variables=None, rules=None)
(Constructor)

source code 

Constructor.

Parameters:
  • description (string) - description
Overrides: object.__init__

fuzzify(self, input)

source code 

Fuzzify the inputs. The input dictionary contains the input values for the named variables.

defuzzify(self, output)

source code 

Defuzzyfy the variables. The output dictionary serves as container and provides the names of the variables to read.

calculate(self, input, output)

source code 

Do a complete fuzzy calculation step. The input dictionary contains the input values for the named variables. The output dictionary serves as container and provides the names of the variables to read.

__repr__(self)
(Representation operator)

source code 

Return representation of instance.

Returns: string
representation of instance
Overrides: object.__repr__