Diwa
Lightweight implementation of Artificial Neural Network for resource-constrained environments
Loading...
Searching...
No Matches
DiwaActivationFunc Class Referencefinal

Class containing static methods for common activation functions. More...

#include <diwa_activations.h>

Static Public Member Functions

static void initializeRadialBasis (double center, double width)
 Initializes the parameters for the radial basis function.
 
static double radialBasis (double x)
 Computes the output of the radial basis function.
 
static double sigmoid (double x)
 Sigmoid activation function.
 
static double gaussian (double x)
 Gaussian activation function.
 

Detailed Description

Class containing static methods for common activation functions.

The DiwaActivationFunc class provides a set of static methods for common activation functions used in neural networks. These activation functions transform the input value to produce the output value of a neuron. Supported activation functions include sigmoid and gaussian functions.

Member Function Documentation

◆ gaussian()

static double DiwaActivationFunc::gaussian ( double  x)
inlinestatic

Gaussian activation function.

The gaussian activation function takes an input value and returns the corresponding output value after applying the gaussian transformation. It produces a bell-shaped curve, ensuring that the output value decreases smoothly as the input value moves away from the center.

Parameters
xThe input value to be transformed.
Returns
The transformed output value after applying the gaussian function.

◆ initializeRadialBasis()

static void DiwaActivationFunc::initializeRadialBasis ( double  center,
double  width 
)
inlinestatic

Initializes the parameters for the radial basis function.

This method initializes the parameters for the radial basis function used in the neural network. It sets the center and region parameters, which affect the shape and behavior of the radial basis function. This method should be called before using the radial basis function.

Parameters
centerThe center parameter for the radial basis function.
widthThe width parameter for the radial basis function, which determines the spread of the function.

◆ radialBasis()

static double DiwaActivationFunc::radialBasis ( double  x)
inlinestatic

Computes the output of the radial basis function.

This method computes the output of the radial basis function for a given input value. The radial basis function produces a bell-shaped curve centered around a specified center parameter. The width of the curve is determined by the region parameter.

Parameters
xThe input value to the radial basis function.
Returns
The output value of the radial basis function for the given input.

◆ sigmoid()

static double DiwaActivationFunc::sigmoid ( double  x)
inlinestatic

Sigmoid activation function.

The sigmoid activation function takes an input value and returns the corresponding output value after applying the sigmoid transformation. It ensures that the output value is bounded between 0 and 1, suitable for binary classification tasks and preventing overflow.

Parameters
xThe input value to be transformed.
Returns
The transformed output value after applying the sigmoid function.

The documentation for this class was generated from the following file: