Sigmoid activation function.
Sigmoid
00 Remarks
The class represents sigmoid activation function with the next expression:
1 f(x) = ------------------ 1 + exp(-alpha * x)
alpha exp(-alpha x ) f'(x) = ---------------------------- = alpha f(x) (1 - f(x)) (1 + exp(-alpha * x))^2
Output range of the function: [0, 1].
Functions graph:
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .ctor | 2 | Initializes a new instance of the Sigmoid class. |
| Function | 1 | Calculates function value. |
| doCall | 1 | Evaluate the logistic sigmoid function value with a specific alpha value. |
| Derivative | 1 | Calculates function derivative. |
| ToString | 1 | Display this activation function as a text expression. |
03 Properties
04 Members
Initializes a new instance of the Sigmoid class.
subclass of IActivationFunction
Double)Initializes a new instance of the Sigmoid class.
subclass of IActivationFunction
| Name | Type | Description |
|---|---|---|
alpha | Double | Sigmoid's alpha value. |
Double)Calculates function value.
The method calculates function value at point x.
| Name | Type | Description |
|---|---|---|
x | Double | Function input value. |
Function output value, f(x).
Double, Double)Evaluate the logistic sigmoid function value with a specific alpha value.
| Name | Type | Description |
|---|---|---|
x | Double | Function input value. |
alpha | Double | The steepness factor of the sigmoid function, the default value is |
Function output value f(x) = 1 / (1 + exp(-alpha * x)), which is limited in the interval [0, 1].
Double)Calculates function derivative.
The method calculates function derivative at point x.
| Name | Type | Description |
|---|---|---|
x | Double | Function input value. |
Function derivative, f'(x).
Display this activation function as a text expression.
A text expression in format like Sigmoid(alpha:=2).
Sigmoid's alpha value.
The value determines steepness of the function. Increasing value of this property changes sigmoid to look more like a threshold function. Decreasing value of this property makes sigmoid to be very smooth (slowly growing from its minimum value to its maximum value).
Default value is set to 2.
Gets the XML serializable data model of this sigmoid function.
A ActiveFunction data model which its function name is Sigmoid, and the Sigmoid.Alpha value is stored as its only argument.