nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.MachineLearning / IActivationFunction

IActivationFunction

Full name Microsoft.VisualBasic.MachineLearning.ComponentModel.Activations.IActivationFunction Assembly Microsoft.VisualBasic.MachineLearning Members 8

Activation function interface.

00 Remarks

All activation functions, which are supposed to be used with neurons, which calculate their output as a function of weighted sum of their inputs, should implement this interfaces.

01 Syntax

Microsoft.VisualBasic.MachineLearning.ComponentModel.Activations.IActivationFunction

02 Methods

NameOverloadsSummary
CalculateDerivative 1 Calculates the derivative value of this activation function at the specific point, and the result will be truncated by the IActivationFunction.Truncate limitation.
Function 1 Calculates function value.
Derivative 1 Calculates function derivative.
ToString 1 必须要重写这个函数来将函数对象序列化为表达式字符串文本

03 Properties

NameOverloadsSummary
Store 1 Gets the XML serializable data model of this activation function, so that the function object can be stored into a xml document.
Truncate 1 因为激活函数在求导之后,结果值可能会出现无穷大 所以可以利用这个值来限制求导之后的结果最大值
Evaluate 2 Evaluate the activation function value for each element in a given vector.

04 Members

method CalculateDerivative #
CalculateDerivative(Double)

Calculates the derivative value of this activation function at the specific point, and the result will be truncated by the IActivationFunction.Truncate limitation.

Parameters
NameTypeDescription
xDouble

The function input value.

Returns

The derivative value f'(x); the infinite value will be replaced by ±100000 and the NaN value will be replaced by 1.

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

method ToString #
ToString

必须要重写这个函数来将函数对象序列化为表达式字符串文本

Returns

The text expression of this activation function, which can be parsed back by the ActiveFunction.Parse() function.

property Store #
Store

Gets the XML serializable data model of this activation function, so that the function object can be stored into a xml document.

Returns

A ActiveFunction data model which can be serialized into a xml document.

property Truncate #
Truncate

因为激活函数在求导之后,结果值可能会出现无穷大 所以可以利用这个值来限制求导之后的结果最大值

Returns

The absolute value limitation of the derivative value; a value that is not a positive number means no truncation will be applied.

property Evaluate overload 2 #
Evaluate(Double)

Evaluate the activation function value at the specific point.

Parameters
NameTypeDescription
xDouble

The function input value.

Returns

The function output value f(x).

property Evaluate #
Evaluate(Vector)

Evaluate the activation function value for each element in a given vector.

Parameters
NameTypeDescription
aVector

A Vector of the function input values.

Returns

A new Vector in which each element is the function output value of the corresponding element in a.