|
Dynamic Neural Field Composer 0.0.0
A C++20 library and interactive application for building and simulating Dynamic Neural Field (DNF) architectures.
|
Logistic (exponential) sigmoid. More...
#include <activation_function.h>
Public Member Functions | |
| void | apply (const std::vector< double > &input, std::vector< double > &out) const override |
Apply the activation function in-place into a pre-allocated out buffer. out must already be sized to input.size(). No heap allocation occurs. | |
| std::unique_ptr< ActivationFunction > | clone () const override |
| double | getSteepness () const |
| double | getXShift () const |
| std::vector< double > | operator() (const std::vector< double > &input) override |
Apply the activation function to input and return the result. | |
| bool | operator== (const SigmoidFunction &other) const |
| void | print () const override |
| SigmoidFunction (const SigmoidFunction &)=default | |
| SigmoidFunction (double x_shift, double steepness) | |
| Construct a sigmoid with the given inflection point and slope. | |
| std::string | toString () const override |
| ~SigmoidFunction () override=default | |
Public Member Functions inherited from dnf_composer::element::ActivationFunction | |
| ActivationFunction ()=default | |
| ActivationFunction (const ActivationFunction &)=default | |
| ActivationFunction & | operator= (const ActivationFunction &)=delete |
| virtual | ~ActivationFunction ()=default |
Public Attributes | |
| double | steepness |
| Slope at the inflection point (cedar/cosivina: beta). | |
| double | x_shift |
| Inflection point of the sigmoid (cedar: theta; cosivina: x0). | |
Public Attributes inherited from dnf_composer::element::ActivationFunction | |
| ActivationFunctionType | type |
| Concrete function type. | |
Logistic (exponential) sigmoid.
Formula: 
Cross-framework equivalence (formula-identical):
| Framework | Type / call |
|---|---|
| dnf-composer | SigmoidFunction(x_shift, steepness) |
| cedar | ExpSigmoid(beta=steepness, theta=x_shift) |
| cosivina | sigmoid(beta=steepness, x0=x_shift) |
All three use the same formula. Only the parameter names differ.
|
default |
| dnf_composer::element::SigmoidFunction::SigmoidFunction | ( | double | x_shift, |
| double | steepness | ||
| ) |
Construct a sigmoid with the given inflection point and slope.
| x_shift | Activation value at the inflection (threshold). |
| steepness | Slope parameter (larger = steeper transition). |
|
overridedefault |
|
overridevirtual |
Apply the activation function in-place into a pre-allocated out buffer. out must already be sized to input.size(). No heap allocation occurs.
Implements dnf_composer::element::ActivationFunction.
|
overridevirtual |
Implements dnf_composer::element::ActivationFunction.
| double dnf_composer::element::SigmoidFunction::getSteepness | ( | ) | const |
| double dnf_composer::element::SigmoidFunction::getXShift | ( | ) | const |
|
overridevirtual |
Apply the activation function to input and return the result.
Implements dnf_composer::element::ActivationFunction.
| bool dnf_composer::element::SigmoidFunction::operator== | ( | const SigmoidFunction & | other | ) | const |
|
overridevirtual |
|
overridevirtual |
| double dnf_composer::element::SigmoidFunction::steepness |
Slope at the inflection point (cedar/cosivina: beta).
| double dnf_composer::element::SigmoidFunction::x_shift |
Inflection point of the sigmoid (cedar: theta; cosivina: x0).