Logo ROOT   6.07/09
Reference Guide
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>
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
static double B[]
static double A[]
TMatrixT.
Definition: TMatrixDfwd.h:24
Int_t GetNrows() const
Definition: TMatrixTBase.h:134
TMarker * m
Definition: textangle.C:8
Int_t GetNcols() const
Definition: TMatrixTBase.h:137
float Real_t
Definition: RtypesCore.h:64
Abstract ClassifierFactory template that handles arbitrary types.
static void Sigmoid(TMatrixT< Real_t > &B)
double exp(double)
const Int_t n
Definition: legend1.C:16