21 lines
598 B
C++
21 lines
598 B
C++
#ifndef RC_ACTIVATION_H
|
|
#define RC_ACTIVATION_H
|
|
|
|
#include <math.h>
|
|
|
|
class Activation {
|
|
public:
|
|
static float HeavisideStep(float inputValue, float bias = 0); // Range: {0,1}
|
|
|
|
static float Tanh(float inputValue); // Range: (-1, 1)
|
|
|
|
static float Sigmoid(float inputValue); // Range: (0, 1)
|
|
|
|
static float Linear(float inputValue, float bias = 0, float range = 0);
|
|
|
|
static float Quadratic(float inputValue, float bias = 0, float range = 0); // minValue = bias
|
|
|
|
static float ParticleLife(float minValue, float maxValue, float attraction, float inputValue); // minValue = bias
|
|
};
|
|
|
|
#endif |