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 8

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.
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

NameOverloadsSummary
Alpha 1 Sigmoid's alpha value.
Store 1 Gets the XML serializable data model of this sigmoid function.

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 doCall #
doCall(Double, Double)

Evaluate the logistic sigmoid function value with a specific alpha value.

Parameters
NameTypeDescription
xDouble

Function input value.

alphaDouble

The steepness factor of the sigmoid function, the default value is 1.

Returns

Function output value f(x) = 1 / (1 + exp(-alpha * x)), which is limited in the interval [0, 1].

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).

method ToString #
ToString

Display this activation function as a text expression.

Returns

A text expression in format like Sigmoid(alpha:=2).

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.

property Store #
Store

Gets the XML serializable data model of this sigmoid function.

Returns

A ActiveFunction data model which its function name is Sigmoid, and the Sigmoid.Alpha value is stored as its only argument.