Diwa
Lightweight implementation of Artificial Neural Network for resource-constrained environments
|
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. | |
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.
|
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.
x | The input value to be transformed. |
|
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.
center | The center parameter for the radial basis function. |
width | The width parameter for the radial basis function, which determines the spread of the function. |
|
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.
x | The input value to the radial basis function. |
|
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.
x | The input value to be transformed. |