26 template<
typename Real_t>
34 for (
size_t i = 0; i <
m; i++) {
35 for (
size_t j = 0; j <
n; j++) {
42 template<
typename Real_t>
49 for (
size_t i = 0; i <
m; i++) {
50 for (
size_t j = 0; j <
n; j++) {
51 A(i,j) = std::max((
Real_t) 0.0,
A(i,j));
57 template<
typename Real_t>
65 for (
size_t i = 0; i <
m; i++)
67 for (
size_t j = 0; j <
n; j++)
69 B(i,j) = (
A(i,j) < 0) ? 0.0 : 1.0;
75 template<
typename Real_t>
82 for (
size_t i = 0; i <
m; i++) {
83 for (
size_t j = 0; j <
n; j++) {
91 template<
typename Real_t>
99 for (
size_t i = 0; i <
m; i++) {
100 for (
size_t j = 0; j <
n; j++) {
102 B(i,j) = sig * (1.0 - sig);
108 template<
typename Real_t>
115 for (
size_t i = 0; i <
m; i++) {
116 for (
size_t j = 0; j <
n; j++) {
124 template<
typename Real_t>
132 for (
size_t i = 0; i <
m; i++) {
133 for (
size_t j = 0; j <
n; j++) {
141 template<
typename Real_t>
148 for (
size_t i = 0; i <
m; i++) {
149 for (
size_t j = 0; j <
n; j++) {
156 template<
typename Real_t>
164 for (
size_t i = 0; i <
m; i++) {
165 for (
size_t j = 0; j <
n; j++) {
166 B(i,j) = (
A(i,j) < 0.0) ? -1.0 : 1.0;
172 template<
typename Real_t>
179 for (
size_t i = 0; i <
m; i++) {
180 for (
size_t j = 0; j <
n; j++) {
182 A(i,j) = x / (1 +
fabs(x));
188 template<
typename Real_t>
196 for (
size_t i = 0; i <
m; i++) {
197 for (
size_t j = 0; j <
n; j++) {
199 B(i,j) = 1.0 / (x *
x);
205 template<
typename Real_t>
212 for (
size_t i = 0; i <
m; i++) {
213 for (
size_t j = 0; j <
n; j++) {
215 A(i,j) =
exp(- x * x);
221 template<
typename Real_t>
229 for (
size_t i = 0; i <
m; i++) {
230 for (
size_t j = 0; j <
n; j++) {
232 B(i,j) = - 2.0 * x *
exp(- x * x);
static void TanhDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void IdentityDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void Tanh(TMatrixT< AReal > &B)
static void Sigmoid(TMatrixT< AReal > &B)
static void SigmoidDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void SoftSign(TMatrixT< AReal > &B)
static void SymmetricReluDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
static void Relu(TMatrixT< AReal > &B)
static void SymmetricRelu(TMatrixT< AReal > &B)
static void ReluDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void GaussDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
static void SoftSignDerivative(TMatrixT< AReal > &B, const TMatrixT< AReal > &A)
Abstract ClassifierFactory template that handles arbitrary types.
static void Gauss(TMatrixT< AReal > &B)