<commit_before>#include <mmintrin.h>
#include <x86intrin.h>
#include <limits>

// Class: ReadMLP
// Automatically generated by MethodBase::MakeClass
//

/* configuration options =====================================================

#GEN -*-*-*-*-*-*-*-*-*-*-*- general info -*-*-*-*-*-*-*-*-*-*-*-

Method         : MLP::MLP
TMVA Release   : 4.2.0         [262656]
ROOT Release   : 5.34/19       [336403]
Creator        : pseyfert
Date           : Thu Feb  5 05:30:31 2015
Host           : Linux sigma0 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Dir            : /auto/sigma0/pseyfert/ghost2015
Training events: 352014
Analysis type  : [Classification]


#OPT -*-*-*-*-*-*-*-*-*-*-*-*- options -*-*-*-*-*-*-*-*-*-*-*-*-

# Set by User:
NCycles: "600" [Number of training cycles]
HiddenLayers: "N+5" [Specification of hidden layer architecture]
NeuronType: "simplesigmoid" [Neuron activation function type]
EstimatorType: "CE" [MSE (Mean Square Estimator) for Gaussian Likelihood or CE(Cross-Entropy) for Bernoulli Likelihood]
V: "False" [Verbose output (short form of "VerbosityLevel" below - overrides the latter one)]
VarTransform: "N" [List of variable transformations performed before training, e.g., "D_Background,P_Signal,G,N_AllClasses" for: "Decorrelation, PCA-transformation, Gaussianisation, Normalisation, each for the given class of events ('AllClasses' denotes all events of all classes, if no class indication is given, 'All' is assumed)"]
H: "False" [Print method-specific help message]
CreateMVAPdfs: "True" [Create PDFs for classifier outputs (signal and background)]
TestRate: "5" [Test for overtraining performed at each #th epochs]
UseRegulator: "False" [Use regulator to avoid over-training]
# Default:
RandomSeed: "1" [Random seed for initial synapse weights (0 means unique seed for each run; default value '1')]
NeuronInputType: "sum" [Neuron input function type]
VerbosityLevel: "Default" [Verbosity level]
IgnoreNegWeightsInTraining: "False" [Events with negative weights are ignored in the training (but are included for testing and performance evaluation)]
TrainingMethod: "BP" [Train with Back-Propagation (BP), BFGS Algorithm (BFGS), or Genetic Algorithm (GA - slower and worse)]
LearningRate: "2.000000e-02" [ANN learning rate parameter]
DecayRate: "1.000000e-02" [Decay rate for learning parameter]
EpochMonitoring: "False" [Provide epoch-wise monitoring plots according to TestRate (caution: causes big ROOT output file!)]
Sampling: "1.000000e+00" [Only 'Sampling' (randomly selected) events are trained each epoch]
SamplingEpoch: "1.000000e+00" [Sampling is used for the first 'SamplingEpoch' epochs, afterwards, all events are taken for training]
SamplingImportance: "1.000000e+00" [ The sampling weights of events in epochs which successful (worse estimator than before) are multiplied with SamplingImportance, else they are divided.]
SamplingTraining: "True" [The training sample is sampled]
SamplingTesting: "False" [The testing sample is sampled]
ResetStep: "50" [How often BFGS should reset history]
Tau: "3.000000e+00" [LineSearch "size step"]
BPMode: "sequential" [Back-propagation learning mode: sequential or batch]
BatchSize: "-1" [Batch size: number of events/batch, only set if in Batch Mode, -1 for BatchSize=number_of_events]
ConvergenceImprove: "1.000000e-30" [Minimum improvement which counts as improvement (<0 means automatic convergence check is turned off)]
ConvergenceTests: "-1" [Number of steps (without improvement) required for convergence (<0 means automatic convergence check is turned off)]
UpdateLimit: "10000" [Maximum times of regulator update]
CalculateErrors: "False" [Calculates inverse Hessian matrix at the end of the training to be able to calculate the uncertainties of an MVA value]
WeightRange: "1.000000e+00" [Take the events for the estimator calculations from small deviations from the desired value to large deviations only over the weight range]
##


#VAR -*-*-*-*-*-*-*-*-*-*-*-* variables *-*-*-*-*-*-*-*-*-*-*-*-

NVar 21
tracks_OldImplementation_obsVELO tracks_OldImplementation_obsVELO tracks_OldImplementation_obsVELO tracks_OldImplementation_obsVELO                                      'F'    [6,36]
tracks_TrackExtraInfo_FitVeloChi2 tracks_TrackExtraInfo_FitVeloChi2 tracks_TrackExtraInfo_FitVeloChi2 tracks_TrackExtraInfo_FitVeloChi2                                       'F'    [3.04506120301e-05,83.3614196777]
tracks_TrackExtraInfo_FitVeloNDoF tracks_TrackExtraInfo_FitVeloNDoF tracks_TrackExtraInfo_FitVeloNDoF tracks_TrackExtraInfo_FitVeloNDoF                                       'F'    [1,31]
tracks_OldImplementation_obsTT tracks_OldImplementation_obsTT tracks_OldImplementation_obsTT tracks_OldImplementation_obsTT                                    'F'    [0,8]
tracks_OldImplementation_TToutlier tracks_OldImplementation_TToutlier tracks_OldImplementation_TToutlier tracks_OldImplementation_TToutlier                                        'F'    [0,2]
tracks_OldImplementation_obsIT tracks_OldImplementation_obsIT tracks_OldImplementation_obsIT tracks_OldImplementation_obsIT                                    'F'    [0,22]
tracks_OldImplementation_obsOT tracks_OldImplementation_obsOT tracks_OldImplementation_obsOT tracks_OldImplementation_obsOT                                    'F'    [0,33]
tracks_OldImplementation_IToutlier tracks_OldImplementation_IToutlier tracks_OldImplementation_IToutlier tracks_OldImplementation_IToutlier                                        'F'    [0,2]
tracks_OldImplementation_OTunused tracks_OldImplementation_OTunused tracks_OldImplementation_OTunused tracks_OldImplementation_OTunused                                       'F'    [0,21]
tracks_TrackExtraInfo_FitTChi2 tracks_TrackExtraInfo_FitTChi2 tracks_TrackExtraInfo_FitTChi2 tracks_TrackExtraInfo_FitTChi2                                    'F'    [0.00208612345159,80.2667617798]
tracks_TrackExtraInfo_FitTNDoF tracks_TrackExtraInfo_FitTNDoF tracks_TrackExtraInfo_FitTNDoF tracks_TrackExtraInfo_FitTNDoF                                    'F'    [1,28]
tracks_OldImplementation_veloHits tracks_OldImplementation_veloHits tracks_OldImplementation_veloHits tracks_OldImplementation_veloHits                                       'F'    [124,5971]
tracks_OldImplementation_ttHits tracks_OldImplementation_ttHits tracks_OldImplementation_ttHits tracks_OldImplementation_ttHits                                     'F'    [31,3186]
tracks_OldImplementation_itHits tracks_OldImplementation_itHits tracks_OldImplementation_itHits tracks_OldImplementation_itHits                                     'F'    [6,3085]
tracks_OldImplementation_otHits tracks_OldImplementation_otHits tracks_OldImplementation_otHits tracks_OldImplementation_otHits                                     'F'    [294,14967]
tracks_PT                     tracks_PT                     tracks_PT                     tracks_PT                                                       'F'    [250.003433228,2775814.75]
tracks_TRACK_CHI2             tracks_TRACK_CHI2             tracks_TRACK_CHI2             tracks_TRACK_CHI2                                               'F'    [2.80131554604,135.065444946]
tracks_TRACK_NDOF             tracks_TRACK_NDOF             tracks_TRACK_NDOF             tracks_TRACK_NDOF                                               'F'    [7,55]
tracks_TRACK_CHI2NDOF         tracks_TRACK_CHI2NDOF         tracks_TRACK_CHI2NDOF         tracks_TRACK_CHI2NDOF                                           'F'    [0.158862292767,2.99999833107]
tracks_TrackExtraInfo_NCandCommonHits tracks_TrackExtraInfo_NCandCommonHits tracks_TrackExtraInfo_NCandCommonHits tracks_TrackExtraInfo_NCandCommonHits                                           'F'    [1,13]
tracks_TrackExtraInfo_FitMatchChi2 tracks_TrackExtraInfo_FitMatchChi2 tracks_TrackExtraInfo_FitMatchChi2 tracks_TrackExtraInfo_FitMatchChi2                                        'F'    [0.0158689655364,91.3790054321]
NSpec 9
tracks_OldImplementation_ghostCat tracks_OldImplementation_ghostCat tracks_OldImplementation_ghostCat F                                                                       'F'    [1,25]
tracks_OldImplementation_originalGhostProb tracks_OldImplementation_originalGhostProb tracks_OldImplementation_originalGhostProb F                                                                                         'F'    [0,1]
tracks_PP_TrackHistory        tracks_PP_TrackHistory        tracks_PP_TrackHistory        F                                                               'F'    [6,16]
tracks_TRACK_Type             tracks_TRACK_Type             tracks_TRACK_Type             F                                                               'F'    [3,3]
tracks_TRACK_Likelihood       tracks_TRACK_Likelihood       tracks_TRACK_Likelihood       F                                                               'F'    [-169.485198975,0.250710725784]
tracks_TrackExtraInfo_Cand1stQPat tracks_TrackExtraInfo_Cand1stQPat tracks_TrackExtraInfo_Cand1stQPat F                                                                       'F'    [-999999,-999999]
tracks_TrackExtraInfo_Cand2ndQPat tracks_TrackExtraInfo_Cand2ndQPat tracks_TrackExtraInfo_Cand2ndQPat F                                                                       'F'    [-999999,-999999]
tracks_TrackExtraInfo_Cand1stChi2Mat tracks_TrackExtraInfo_Cand1stChi2Mat tracks_TrackExtraInfo_Cand1stChi2Mat F                                                                             'F'    [-999999,-999999]
tracks_TrackExtraInfo_Cand2ndChi2Mat tracks_TrackExtraInfo_Cand2ndChi2Mat tracks_TrackExtraInfo_Cand2ndChi2Mat F                                                                             'F'    [-999999,-999999]


============================================================================ */

#include <vector>
#include <cmath>
#include <string>
#include <iostream>

class ReadMLP : public IClassifierReader {

 public:

   // constructor
   ReadMLP( std::vector<std::string>& theInputVars ) 
      : IClassifierReader()
   {      
      // the training input variables
      const char* inputVars[] = { "tracks_OldImplementation_obsVELO", "tracks_TrackExtraInfo_FitVeloChi2", "tracks_TrackExtraInfo_FitVeloNDoF", "tracks_OldImplementation_obsTT", "tracks_OldImplementation_TToutlier", "tracks_OldImplementation_obsIT", "tracks_OldImplementation_obsOT", "tracks_OldImplementation_IToutlier", "tracks_OldImplementation_OTunused", "tracks_TrackExtraInfo_FitTChi2", "tracks_TrackExtraInfo_FitTNDoF", "tracks_OldImplementation_veloHits", "tracks_OldImplementation_ttHits", "tracks_OldImplementation_itHits", "tracks_OldImplementation_otHits", "tracks_PT", "tracks_TRACK_CHI2", "tracks_TRACK_NDOF", "tracks_TRACK_CHI2NDOF", "tracks_TrackExtraInfo_NCandCommonHits", "tracks_TrackExtraInfo_FitMatchChi2" };

      // initialize constants
      Initialize();

      // initialize transformation
      InitTransform();
   }

   // destructor
   virtual ~ReadMLP() {
      Clear(); // method-specific
   }

   // the classifier response
   // "inputValues" is a vector of input values in the same order as the 
   // variables given to the constructor
   float GetMvaValue( std::vector<float>& inputValues );

 private:

   // method-specific destructor
   void Clear();

   // input variable transformation

   float fMin_1[3][24] __attribute__ ((aligned (32)));
   float fscale[3][24] __attribute__ ((aligned (32)));
   void InitTransform_1();
   void Transform_1( std::vector<float> & iv, int sigOrBgd );
   void InitTransform();
   void Transform( std::vector<float> & iv, int sigOrBgd );

   // initialize internal variables
   void Initialize();
   void Dummy();
   float GetMvaValue__( );

   // private members (method specific)

   float ActivationFnc(float x) const;
   __m128 ActivationFnc(__m128 x) const;
   __m256 ActivationFnc(__m256 x) const;

   float fWeightMatrix0to1[26][24] __attribute__ ((aligned (32)));   // weight matrix from layer 0 to 1
   __m256 matrix1to2[4];
   __m256 invals[3];

  __m256 oneeten;
};

inline void ReadMLP::Initialize()
{
  //Dummy();
   oneeten = _mm256_set_ps(1e10f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f);
  //
   // weight matrix from layer 0 to 1
   fWeightMatrix0to1[0][0] = -1.29181860423292;
   fWeightMatrix0to1[1][0] = 0.903804335642756;
   fWeightMatrix0to1[2][0] = -0.607481193406975;
   fWeightMatrix0to1[3][0] = 2.41271959507407;
   fWeightMatrix0to1[4][0] = 1.55507755565827;
   fWeightMatrix0to1[5][0] = 11.7546940208225;
   fWeightMatrix0to1[6][0] = -3.84899175954808;
   fWeightMatrix0to1[7][0] = 1.66258240632677;<commit_msg>fixing numerics in avx for fma inspired initialisation Merge branch 'master' of /home/pseyfert/coding/tmva-mlp<commit_after>#include <mmintrin.h>
#include <x86intrin.h>
#include <limits>

// Class: ReadMLP
// Automatically generated by MethodBase::MakeClass
//

/* configuration options =====================================================

#GEN -*-*-*-*-*-*-*-*-*-*-*- general info -*-*-*-*-*-*-*-*-*-*-*-

Method         : MLP::MLP
TMVA Release   : 4.2.0         [262656]
ROOT Release   : 5.34/19       [336403]
Creator        : pseyfert
Date           : Thu Feb  5 05:30:31 2015
Host           : Linux sigma0 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Dir            : /auto/sigma0/pseyfert/ghost2015
Training events: 352014
Analysis type  : [Classification]


#OPT -*-*-*-*-*-*-*-*-*-*-*-*- options -*-*-*-*-*-*-*-*-*-*-*-*-

# Set by User:
NCycles: "600" [Number of training cycles]
HiddenLayers: "N+5" [Specification of hidden layer architecture]
NeuronType: "simplesigmoid" [Neuron activation function type]
EstimatorType: "CE" [MSE (Mean Square Estimator) for Gaussian Likelihood or CE(Cross-Entropy) for Bernoulli Likelihood]
V: "False" [Verbose output (short form of "VerbosityLevel" below - overrides the latter one)]
VarTransform: "N" [List of variable transformations performed before training, e.g., "D_Background,P_Signal,G,N_AllClasses" for: "Decorrelation, PCA-transformation, Gaussianisation, Normalisation, each for the given class of events ('AllClasses' denotes all events of all classes, if no class indication is given, 'All' is assumed)"]
H: "False" [Print method-specific help message]
CreateMVAPdfs: "True" [Create PDFs for classifier outputs (signal and background)]
TestRate: "5" [Test for overtraining performed at each #th epochs]
UseRegulator: "False" [Use regulator to avoid over-training]
# Default:
RandomSeed: "1" [Random seed for initial synapse weights (0 means unique seed for each run; default value '1')]
NeuronInputType: "sum" [Neuron input function type]
VerbosityLevel: "Default" [Verbosity level]
IgnoreNegWeightsInTraining: "False" [Events with negative weights are ignored in the training (but are included for testing and performance evaluation)]
TrainingMethod: "BP" [Train with Back-Propagation (BP), BFGS Algorithm (BFGS), or Genetic Algorithm (GA - slower and worse)]
LearningRate: "2.000000e-02" [ANN learning rate parameter]
DecayRate: "1.000000e-02" [Decay rate for learning parameter]
EpochMonitoring: "False" [Provide epoch-wise monitoring plots according to TestRate (caution: causes big ROOT output file!)]
Sampling: "1.000000e+00" [Only 'Sampling' (randomly selected) events are trained each epoch]
SamplingEpoch: "1.000000e+00" [Sampling is used for the first 'SamplingEpoch' epochs, afterwards, all events are taken for training]
SamplingImportance: "1.000000e+00" [ The sampling weights of events in epochs which successful (worse estimator than before) are multiplied with SamplingImportance, else they are divided.]
SamplingTraining: "True" [The training sample is sampled]
SamplingTesting: "False" [The testing sample is sampled]
ResetStep: "50" [How often BFGS should reset history]
Tau: "3.000000e+00" [LineSearch "size step"]
BPMode: "sequential" [Back-propagation learning mode: sequential or batch]
BatchSize: "-1" [Batch size: number of events/batch, only set if in Batch Mode, -1 for BatchSize=number_of_events]
ConvergenceImprove: "1.000000e-30" [Minimum improvement which counts as improvement (<0 means automatic convergence check is turned off)]
ConvergenceTests: "-1" [Number of steps (without improvement) required for convergence (<0 means automatic convergence check is turned off)]
UpdateLimit: "10000" [Maximum times of regulator update]
CalculateErrors: "False" [Calculates inverse Hessian matrix at the end of the training to be able to calculate the uncertainties of an MVA value]
WeightRange: "1.000000e+00" [Take the events for the estimator calculations from small deviations from the desired value to large deviations only over the weight range]
##


#VAR -*-*-*-*-*-*-*-*-*-*-*-* variables *-*-*-*-*-*-*-*-*-*-*-*-

NVar 21
tracks_OldImplementation_obsVELO tracks_OldImplementation_obsVELO tracks_OldImplementation_obsVELO tracks_OldImplementation_obsVELO                                      'F'    [6,36]
tracks_TrackExtraInfo_FitVeloChi2 tracks_TrackExtraInfo_FitVeloChi2 tracks_TrackExtraInfo_FitVeloChi2 tracks_TrackExtraInfo_FitVeloChi2                                       'F'    [3.04506120301e-05,83.3614196777]
tracks_TrackExtraInfo_FitVeloNDoF tracks_TrackExtraInfo_FitVeloNDoF tracks_TrackExtraInfo_FitVeloNDoF tracks_TrackExtraInfo_FitVeloNDoF                                       'F'    [1,31]
tracks_OldImplementation_obsTT tracks_OldImplementation_obsTT tracks_OldImplementation_obsTT tracks_OldImplementation_obsTT                                    'F'    [0,8]
tracks_OldImplementation_TToutlier tracks_OldImplementation_TToutlier tracks_OldImplementation_TToutlier tracks_OldImplementation_TToutlier                                        'F'    [0,2]
tracks_OldImplementation_obsIT tracks_OldImplementation_obsIT tracks_OldImplementation_obsIT tracks_OldImplementation_obsIT                                    'F'    [0,22]
tracks_OldImplementation_obsOT tracks_OldImplementation_obsOT tracks_OldImplementation_obsOT tracks_OldImplementation_obsOT                                    'F'    [0,33]
tracks_OldImplementation_IToutlier tracks_OldImplementation_IToutlier tracks_OldImplementation_IToutlier tracks_OldImplementation_IToutlier                                        'F'    [0,2]
tracks_OldImplementation_OTunused tracks_OldImplementation_OTunused tracks_OldImplementation_OTunused tracks_OldImplementation_OTunused                                       'F'    [0,21]
tracks_TrackExtraInfo_FitTChi2 tracks_TrackExtraInfo_FitTChi2 tracks_TrackExtraInfo_FitTChi2 tracks_TrackExtraInfo_FitTChi2                                    'F'    [0.00208612345159,80.2667617798]
tracks_TrackExtraInfo_FitTNDoF tracks_TrackExtraInfo_FitTNDoF tracks_TrackExtraInfo_FitTNDoF tracks_TrackExtraInfo_FitTNDoF                                    'F'    [1,28]
tracks_OldImplementation_veloHits tracks_OldImplementation_veloHits tracks_OldImplementation_veloHits tracks_OldImplementation_veloHits                                       'F'    [124,5971]
tracks_OldImplementation_ttHits tracks_OldImplementation_ttHits tracks_OldImplementation_ttHits tracks_OldImplementation_ttHits                                     'F'    [31,3186]
tracks_OldImplementation_itHits tracks_OldImplementation_itHits tracks_OldImplementation_itHits tracks_OldImplementation_itHits                                     'F'    [6,3085]
tracks_OldImplementation_otHits tracks_OldImplementation_otHits tracks_OldImplementation_otHits tracks_OldImplementation_otHits                                     'F'    [294,14967]
tracks_PT                     tracks_PT                     tracks_PT                     tracks_PT                                                       'F'    [250.003433228,2775814.75]
tracks_TRACK_CHI2             tracks_TRACK_CHI2             tracks_TRACK_CHI2             tracks_TRACK_CHI2                                               'F'    [2.80131554604,135.065444946]
tracks_TRACK_NDOF             tracks_TRACK_NDOF             tracks_TRACK_NDOF             tracks_TRACK_NDOF                                               'F'    [7,55]
tracks_TRACK_CHI2NDOF         tracks_TRACK_CHI2NDOF         tracks_TRACK_CHI2NDOF         tracks_TRACK_CHI2NDOF                                           'F'    [0.158862292767,2.99999833107]
tracks_TrackExtraInfo_NCandCommonHits tracks_TrackExtraInfo_NCandCommonHits tracks_TrackExtraInfo_NCandCommonHits tracks_TrackExtraInfo_NCandCommonHits                                           'F'    [1,13]
tracks_TrackExtraInfo_FitMatchChi2 tracks_TrackExtraInfo_FitMatchChi2 tracks_TrackExtraInfo_FitMatchChi2 tracks_TrackExtraInfo_FitMatchChi2                                        'F'    [0.0158689655364,91.3790054321]
NSpec 9
tracks_OldImplementation_ghostCat tracks_OldImplementation_ghostCat tracks_OldImplementation_ghostCat F                                                                       'F'    [1,25]
tracks_OldImplementation_originalGhostProb tracks_OldImplementation_originalGhostProb tracks_OldImplementation_originalGhostProb F                                                                                         'F'    [0,1]
tracks_PP_TrackHistory        tracks_PP_TrackHistory        tracks_PP_TrackHistory        F                                                               'F'    [6,16]
tracks_TRACK_Type             tracks_TRACK_Type             tracks_TRACK_Type             F                                                               'F'    [3,3]
tracks_TRACK_Likelihood       tracks_TRACK_Likelihood       tracks_TRACK_Likelihood       F                                                               'F'    [-169.485198975,0.250710725784]
tracks_TrackExtraInfo_Cand1stQPat tracks_TrackExtraInfo_Cand1stQPat tracks_TrackExtraInfo_Cand1stQPat F                                                                       'F'    [-999999,-999999]
tracks_TrackExtraInfo_Cand2ndQPat tracks_TrackExtraInfo_Cand2ndQPat tracks_TrackExtraInfo_Cand2ndQPat F                                                                       'F'    [-999999,-999999]
tracks_TrackExtraInfo_Cand1stChi2Mat tracks_TrackExtraInfo_Cand1stChi2Mat tracks_TrackExtraInfo_Cand1stChi2Mat F                                                                             'F'    [-999999,-999999]
tracks_TrackExtraInfo_Cand2ndChi2Mat tracks_TrackExtraInfo_Cand2ndChi2Mat tracks_TrackExtraInfo_Cand2ndChi2Mat F                                                                             'F'    [-999999,-999999]


============================================================================ */

#include <vector>
#include <cmath>
#include <string>
#include <iostream>

class ReadMLP : public IClassifierReader {

 public:

   // constructor
   ReadMLP( std::vector<std::string>& theInputVars ) 
      : IClassifierReader()
   {      
      // the training input variables
      const char* inputVars[] = { "tracks_OldImplementation_obsVELO", "tracks_TrackExtraInfo_FitVeloChi2", "tracks_TrackExtraInfo_FitVeloNDoF", "tracks_OldImplementation_obsTT", "tracks_OldImplementation_TToutlier", "tracks_OldImplementation_obsIT", "tracks_OldImplementation_obsOT", "tracks_OldImplementation_IToutlier", "tracks_OldImplementation_OTunused", "tracks_TrackExtraInfo_FitTChi2", "tracks_TrackExtraInfo_FitTNDoF", "tracks_OldImplementation_veloHits", "tracks_OldImplementation_ttHits", "tracks_OldImplementation_itHits", "tracks_OldImplementation_otHits", "tracks_PT", "tracks_TRACK_CHI2", "tracks_TRACK_NDOF", "tracks_TRACK_CHI2NDOF", "tracks_TrackExtraInfo_NCandCommonHits", "tracks_TrackExtraInfo_FitMatchChi2" };

      // initialize constants
      Initialize();

      // initialize transformation
      InitTransform();
   }

   // destructor
   virtual ~ReadMLP() {
      Clear(); // method-specific
   }

   // the classifier response
   // "inputValues" is a vector of input values in the same order as the 
   // variables given to the constructor
   float GetMvaValue( std::vector<float>& inputValues );

 private:

   // method-specific destructor
   void Clear();

   // input variable transformation

   float fMin_1[3][24] __attribute__ ((aligned (32)));
   float fscale[3][24] __attribute__ ((aligned (32)));
   void InitTransform_1();
   void Transform_1( std::vector<float> & iv, int sigOrBgd );
   void InitTransform();
   void Transform( std::vector<float> & iv, int sigOrBgd );

   // initialize internal variables
   void Initialize();
   void Dummy();
   float GetMvaValue__( );

   // private members (method specific)

   float ActivationFnc(float x) const;
   __m128 ActivationFnc(__m128 x) const;
   __m256 ActivationFnc(__m256 x) const;

   float fWeightMatrix0to1[26][24] __attribute__ ((aligned (32)));   // weight matrix from layer 0 to 1
   __m256 matrix1to2[4];
   __m256 invals[3];

  __m256 oneeten;
};

inline void ReadMLP::Initialize()
{
  //Dummy();
   //oneeten = _mm256_set_ps(0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 1e10f);
   oneeten = _mm256_set1_ps(1e10f); /// same result but less headache
  //
   // weight matrix from layer 0 to 1
   fWeightMatrix0to1[0][0] = -1.29181860423292;
   fWeightMatrix0to1[1][0] = 0.903804335642756;
   fWeightMatrix0to1[2][0] = -0.607481193406975;
   fWeightMatrix0to1[3][0] = 2.41271959507407;
   fWeightMatrix0to1[4][0] = 1.55507755565827;
   fWeightMatrix0to1[5][0] = 11.7546940208225;
   fWeightMatrix0to1[6][0] = -3.84899175954808;
   fWeightMatrix0to1[7][0] = 1.66258240632677;
{'fraction_non_alphanumeric': 0.08879293424926399, 'fraction_numerical': 0.056722276741903825, 'mean_word_length': 2.984983575786016, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 140, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2504447', 'n_tokens_mistral': 8428, 'n_tokens_neox': 7222, 'n_words': 1708}