Package transsys :: Module optim :: Class SigmoidFunction
[hide private]
[frames] | no frames]

Class SigmoidFunction

source code

            object --+    
                     |    
TransformationFunction --+
                         |
                        SigmoidFunction

Sigmoid parameter transformation.

This is a callable class implementing the transformation function y = minValue + (maxValue - minValue) / (1.0 + exp(-exponentMultiplier * x)).

Instance Methods [hide private]
 
__init__(self, exponentMultiplier=1.0, minValue=0.0, maxValue=1.0)
Constructor.
source code
 
__call__(self, x)
Compute function value.
source code
 
__str__(self)
str(x)
source code
 
parse_variables(self, f) source code
 
getMaxValue(self) source code
 
clip(self, y)
Clip y to the nearest admissible value.
source code
float or None
inverse(self, y)
Compute inverse.
source code

Inherited from TransformationFunction: check_savefile_magic, parse

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]
  functionName = 'SigmoidFunction'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, exponentMultiplier=1.0, minValue=0.0, maxValue=1.0)
(Constructor)

source code 

Constructor.

Overrides: object.__init__

__call__(self, x)
(Call operator)

source code 

Compute function value.

Overrides: TransformationFunction.__call__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

parse_variables(self, f)

source code 
Overrides: TransformationFunction.parse_variables

clip(self, y)

source code 

Clip y to the nearest admissible value.

Overrides: TransformationFunction.clip
(inherited documentation)

inverse(self, y)

source code 

Compute inverse.

Notice that the inverse diverges towards the borders of the sigmoid function's range. Exactly at the borders, the inverse method attempts to return the closest value that can be transformed without a floating point overflow.

Returns: float or None
inverse function value, or None if y is out of admissible range
Overrides: TransformationFunction.inverse