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. |
| Derivative | 1 | Calculates function derivative. |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| Alpha | 1 | Sigmoid's alpha value. |
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)Calculates function derivative.
The method calculates function derivative at point x.
| Name | Type | Description |
|---|---|---|
x | Double | Function input value. |
Function derivative, f'(x).
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.