ROOT
6.07/09
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
tmva
tmva
src
DNN
Architectures
Reference
OutputFunctions.cxx
Go to the documentation of this file.
1
// @(#)root/tmva/tmva/dnn:$Id$
2
// Author: Simon Pfreundschuh 11/07/16
3
4
/*************************************************************************
5
* Copyright (C) 2016, Simon Pfreundschuh *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
////////////////////////////////////////////////////////////////
13
// Explicit instantiation of the TReference architecture class //
14
// template for Double_t scalar types. //
15
////////////////////////////////////////////////////////////////
16
17
namespace
TMVA
{
18
namespace
DNN {
19
20
template
<
typename
Real_t>
21
void
TReference<Real_t>::Sigmoid
(
TMatrixT<Real_t>
&
B
,
22
const
TMatrixT<Real_t>
&
A
)
23
{
24
size_t
m
,
n
;
25
m = A.
GetNrows
();
26
n = A.
GetNcols
();
27
28
for
(
size_t
i = 0; i <
m
; i++) {
29
for
(
size_t
j = 0; j <
n
; j++) {
30
Real_t
sig = 1.0 / (1.0 +
std::exp
(-
A
(i,j)));
31
B
(i,j) = sig;
32
}
33
}
34
}
35
36
}
// namespace TMVA
37
}
// namespace DNN
ROOT::Math::Cephes::B
static double B[]
Definition:
SpecFuncCephes.cxx:178
ROOT::Math::Cephes::A
static double A[]
Definition:
SpecFuncCephes.cxx:170
TMatrixT
TMatrixT.
Definition:
TMatrixDfwd.h:24
TMatrixTBase::GetNrows
Int_t GetNrows() const
Definition:
TMatrixTBase.h:134
m
TMarker * m
Definition:
textangle.C:8
TMatrixTBase::GetNcols
Int_t GetNcols() const
Definition:
TMatrixTBase.h:137
Real_t
float Real_t
Definition:
RtypesCore.h:64
TMVA
Abstract ClassifierFactory template that handles arbitrary types.
Definition:
GeneticMinimizer.h:21
TMVA::DNN::TReference::Sigmoid
static void Sigmoid(TMatrixT< Real_t > &B)
Definition:
ActivationFunctions.cxx:76
exp
double exp(double)
n
const Int_t n
Definition:
legend1.C:16