Bardo.Functions (Bardo v0.1.0)
View SourceThe Functions module contains the activation functions used by the neuron, and other mathematical functions used by the system. Through the Functions module, the activation functions are fully decoupled from the neurons using them. A neuron can use any activation function, no matter its form, as long as it returns a properly formatted value.
NOTE: While the activation functions are all stored in the Functions module, the aggregation and the plasticity functions are stored in the SignalAggregator and Plasticity modules respectively.
Summary
Functions
The avg/1 function accepts a list for a parameter, and then returns the average of the list to the caller.
The bin/1 function converts val into a binary value, 1 if val > 0, and 0 if val <= 0.
The sat/3 function is similar to saturation/2 function, but here the max and min can be different, and are specified by the caller.
The sat_dzone/5 function is similar to the sat/3 function, but here, if val is between dzmin and dzmax, it is zeroed.
The function saturation/1 accepts a value val, and returns the same if its magnitude is below 1000. Otherwise it returns -1000 or 1000, if it's less than or greater than -1000 or 1000 respectively. Thus val saturates at -1000 and 1000.
The saturation/2 function is similar to saturation/1, but here the spread (symmetric max and min values) is specified by the caller.
The scale/3 function accepts a list of values, and scales them to be between the specified min and max values.
The std/1 function accepts a list for a parameter, and then returns to the caller the standard deviation of the list.
The trinary/1 function converts val into a trinary value.
Functions
The avg/1 function accepts a list for a parameter, and then returns the average of the list to the caller.
@spec bin(float()) :: 0 | 1
The bin/1 function converts val into a binary value, 1 if val > 0, and 0 if val <= 0.
The sat/3 function is similar to saturation/2 function, but here the max and min can be different, and are specified by the caller.
The sat_dzone/5 function is similar to the sat/3 function, but here, if val is between dzmin and dzmax, it is zeroed.
The function saturation/1 accepts a value val, and returns the same if its magnitude is below 1000. Otherwise it returns -1000 or 1000, if it's less than or greater than -1000 or 1000 respectively. Thus val saturates at -1000 and 1000.
The saturation/2 function is similar to saturation/1, but here the spread (symmetric max and min values) is specified by the caller.
The scale/3 function accepts a list of values, and scales them to be between the specified min and max values.
@spec sgn(float()) :: -1 | 0 | 1
The std/1 function accepts a list for a parameter, and then returns to the caller the standard deviation of the list.
@spec trinary(float()) :: -1 | 0 | 1
The trinary/1 function converts val into a trinary value.