C# Class Accord.Neuro.ActivationFunctions.BernoulliFunction

Inheritance: IStochasticFunction
Show file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
BernoulliFunction ( ) : System

Initializes a new instance of the BernoulliFunction class.

BernoulliFunction ( double alpha ) : System

Initializes a new instance of the BernoulliFunction class.

Derivative ( double x ) : double

Calculates function derivative.

The method calculates function derivative at point x.

Derivative2 ( double y ) : double

Calculates function derivative.

The method calculates the same derivative value as the Derivative method, but it takes not the input x value itself, but the function value, which was calculated previously with the help of Function method.

Some applications require as function value, as derivative value, so they can save the amount of calculations using this method to calculate derivative.

Function ( double x ) : double

Calculates function value.

The method calculates function value at point x.

Generate ( double x ) : double

Samples a value from the function given a input value.

Generate2 ( double y ) : double

Samples a value from the function given a function output value.

The method calculates the same output value as the Generate method, but it takes not the input x value itself, but the function value, which was calculated previously with help of the IActivationFunction.Function(double) method.

Method Details

BernoulliFunction() public method

Initializes a new instance of the BernoulliFunction class.
public BernoulliFunction ( ) : System
return System

BernoulliFunction() public method

Initializes a new instance of the BernoulliFunction class.
public BernoulliFunction ( double alpha ) : System
alpha double Sigmoid's alpha value. Default is 1.
return System

Derivative() public method

Calculates function derivative.
The method calculates function derivative at point x.
public Derivative ( double x ) : double
x double Function input value.
return double

Derivative2() public method

Calculates function derivative.

The method calculates the same derivative value as the Derivative method, but it takes not the input x value itself, but the function value, which was calculated previously with the help of Function method.

Some applications require as function value, as derivative value, so they can save the amount of calculations using this method to calculate derivative.

public Derivative2 ( double y ) : double
y double Function output value - the value, which was obtained /// with the help of method.
return double

Function() public method

Calculates function value.
The method calculates function value at point x.
public Function ( double x ) : double
x double Function input value.
return double

Generate() public method

Samples a value from the function given a input value.
public Generate ( double x ) : double
x double Function input value.
return double

Generate2() public method

Samples a value from the function given a function output value.

The method calculates the same output value as the Generate method, but it takes not the input x value itself, but the function value, which was calculated previously with help of the IActivationFunction.Function(double) method.

public Generate2 ( double y ) : double
y double The function output value. This is the value which was obtained /// with the help of the method.
return double