nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.MachineLearning / Sigmoid

Sigmoid

Full name Microsoft.VisualBasic.MachineLearning.ComponentModel.Activations.Sigmoid Assembly Microsoft.VisualBasic.MachineLearning Members 5

Sigmoid activation function.

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

Microsoft.VisualBasic.MachineLearning.ComponentModel.Activations.Sigmoid

02 Methods

NameOverloadsSummary
.ctor 2 Initializes a new instance of the Sigmoid class.
Function 1 Calculates function value.
Derivative 1 Calculates function derivative.

03 Properties

NameOverloadsSummary
Alpha 1 Sigmoid's alpha value.

04 Members

method .ctor #
#ctor

Initializes a new instance of the Sigmoid class.

Remarks
method .ctor overload 2 #
#ctor(Double)

Initializes a new instance of the Sigmoid class.

Remarks
Parameters
NameTypeDescription
alphaDouble

Sigmoid's alpha value.

method Function #
Function(Double)

Calculates function value.

Remarks

The method calculates function value at point x.

Parameters
NameTypeDescription
xDouble

Function input value.

Returns

Function output value, f(x).

method Derivative #
Derivative(Double)

Calculates function derivative.

Remarks

The method calculates function derivative at point x.

Parameters
NameTypeDescription
xDouble

Function input value.

Returns

Function derivative, f'(x).

property Alpha #
Alpha

Sigmoid's alpha value.

Remarks

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.