#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "mlp_gen.h"
#include "mlp_sigmoide.h"
Go to the source code of this file.
Macros | |
#define | CLEN 1024 |
#define | NLMAX 1000 |
#define | NPMAX 100000 |
Functions | |
int | AllocNetwork (int Nlayer, int *Neurons) |
int | AllocPatterns (int ifile, int npat, int nin, int nout, int iadd) |
void | BFGSdir (int Nweights) |
void | CGDir (dbl beta) |
int | CountLexemes (char *s) |
int | DecreaseSearch (dbl *alpmin, int *Ntest, dbl Err0) |
dbl | DeDwNorm () |
dbl | DeDwProd () |
void | DeDwSave () |
void | DeDwSaveZero () |
void | DeDwScale (int Nexamples) |
int | DeDwSum (type_pat *ans, dbl *out, int ipat) |
void | DeDwZero () |
dbl | DerivDir () |
int | dgels_ (char *trans, int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *work, int *lwork, int *info) |
void | EtaDecay () |
int | FixedStep (dbl alpha) |
void | FreeNetwork () |
int | FreePatterns (int ifile) |
int | GetBFGSH (int Nweights) |
void | GetGammaDelta () |
void | getLexemes (char *s, char **ss) |
int | GetNetStructure (char *s, int *Nlayer, int *Nneur) |
void | getnLexemes (int n, char *s, char **ss) |
void | InitBFGSH (int Nweights) |
void | InitWeights () |
int | LearnAlloc () |
void | LearnFree () |
int | LineSearch (dbl *alpmin, int *Ntest, dbl Err0) |
int | LineSearchHyb (dbl *alpmin, int *Ntest) |
int | LoadWeights (char *filename, int *iepoch) |
dbl | MLP_Epoch (int iepoch, dbl *alpmin, int *Ntest) |
void | MLP_Line (dbl ***w0, dbl alpha) |
void | MLP_LineHyb (dbl ***w0, dbl alpha) |
void | MLP_MatrixVector (dbl *M, type_pat *v, dbl *r, int n, int m) |
void | MLP_MatrixVectorBias (dbl *M, dbl *v, dbl *r, int n, int m) |
void | MLP_MM2rows (dbl *c, type_pat *a, dbl *b, int Ni, int Nj, int Nk, int NaOffs, int NbOffs) |
void | MLP_Out (type_pat *rrin, dbl *rrout) |
void | MLP_Out2 (type_pat *rrin) |
void | MLP_Out_T (type_pat *rrin) |
int | MLP_PrCFun (char *filename) |
int | MLP_PrFFun (char *filename) |
int | MLP_PrintInputStat () |
double | MLP_Rand (dbl mini, dbl maxi) |
void | MLP_ResLin () |
int | MLP_SetNet (int *nl, int *nn) |
int | MLP_StatInputs (int Nexamples, int Ninputs, type_pat **inputs, dbl *mean, dbl *sigma, dbl *minimum, dbl *maximum) |
dbl | MLP_Stochastic () |
dbl | MLP_Test (int ifile, int regul) |
dbl | MLP_Test_MM (int ifile, dbl *tmp) |
int | MLP_Train (int *ipat, dbl *err) |
int | NormalizeInputs () |
void | PrintWeights () |
int | ReadPatterns (char *filename, int ifile, int *inet, int *ilearn, int *iexamples) |
int | SaveWeights (char *filename, int iepoch) |
void | SetDefaultFuncs () |
void | SetLambda (double Wmax) |
int | SetTransFunc (int layer, int neuron, int func) |
int | ShuffleExamples (int n, int *index) |
void | SteepestDir () |
int | StochStep () |
int | StochStepHyb () |
Variables | |
dbl ** | BFGSH |
int | BFGSMemory = 0 |
dbl * | delta |
dbl *** | dir |
int * | ExamplesIndex |
int | ExamplesMemory = 0 |
dbl * | Gamma |
dbl ** | Hessian |
dbl ** | JacobianMatrix |
int | JacobianMemory = 0 |
dbl | LastAlpha = 0 |
int | LearnMemory = 0 |
int | MessLang = 0 |
struct net_ net_ | MLP_HIDDEN |
float | MLPfitVersion = (float) 1.40 |
int | NetMemory = 0 |
int | NLineSearchFail = 0 |
int | OutputWeights = 100 |
int | PatMemory [2] = {0,0} |
int | WeightsMemory = 0 |
#define CLEN 1024 |
Definition at line 2226 of file mlp_gen.cc.
#define NLMAX 1000 |
Definition at line 14 of file mlp_gen.cc.
#define NPMAX 100000 |
Definition at line 13 of file mlp_gen.cc.
int AllocNetwork | ( | int | Nlayer, |
int * | Neurons | ||
) |
Definition at line 3449 of file mlp_gen.cc.
int AllocPatterns | ( | int | ifile, |
int | npat, | ||
int | nin, | ||
int | nout, | ||
int | iadd | ||
) |
Definition at line 3077 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::init().
void BFGSdir | ( | int | Nweights | ) |
Definition at line 1340 of file mlp_gen.cc.
void CGDir | ( | dbl | beta | ) |
Definition at line 1266 of file mlp_gen.cc.
int CountLexemes | ( | char * | s | ) |
Definition at line 2585 of file mlp_gen.cc.
Definition at line 1616 of file mlp_gen.cc.
dbl DeDwNorm | ( | ) |
Definition at line 998 of file mlp_gen.cc.
dbl DeDwProd | ( | ) |
Definition at line 1020 of file mlp_gen.cc.
void DeDwSave | ( | ) |
Definition at line 1078 of file mlp_gen.cc.
void DeDwSaveZero | ( | ) |
Definition at line 1097 of file mlp_gen.cc.
void DeDwScale | ( | int | Nexamples | ) |
Definition at line 1060 of file mlp_gen.cc.
Definition at line 1123 of file mlp_gen.cc.
void DeDwZero | ( | ) |
Definition at line 1041 of file mlp_gen.cc.
dbl DerivDir | ( | ) |
Definition at line 1288 of file mlp_gen.cc.
int dgels_ | ( | char * | trans, |
int * | m, | ||
int * | n, | ||
int * | nrhs, | ||
double * | a, | ||
int * | lda, | ||
double * | b, | ||
int * | ldb, | ||
double * | work, | ||
int * | lwork, | ||
int * | info | ||
) |
void EtaDecay | ( | ) |
Definition at line 2086 of file mlp_gen.cc.
int FixedStep | ( | dbl | alpha | ) |
Definition at line 1704 of file mlp_gen.cc.
void FreeNetwork | ( | ) |
Definition at line 3531 of file mlp_gen.cc.
int FreePatterns | ( | int | ifile | ) |
Definition at line 3232 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::clear().
int GetBFGSH | ( | int | Nweights | ) |
Definition at line 1418 of file mlp_gen.cc.
void GetGammaDelta | ( | ) |
Definition at line 1313 of file mlp_gen.cc.
void getLexemes | ( | char * | s, |
char ** | ss | ||
) |
Definition at line 2615 of file mlp_gen.cc.
int GetNetStructure | ( | char * | s, |
int * | Nlayer, | ||
int * | Nneur | ||
) |
Definition at line 3592 of file mlp_gen.cc.
void getnLexemes | ( | int | n, |
char * | s, | ||
char ** | ss | ||
) |
Definition at line 2601 of file mlp_gen.cc.
void InitBFGSH | ( | int | Nweights | ) |
Definition at line 1388 of file mlp_gen.cc.
void InitWeights | ( | ) |
Definition at line 2147 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::MLP().
int LearnAlloc | ( | ) |
Definition at line 2685 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::MLP().
void LearnFree | ( | ) |
Definition at line 2640 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::~MLP().
Definition at line 1478 of file mlp_gen.cc.
int LineSearchHyb | ( | dbl * | alpmin, |
int * | Ntest | ||
) |
Definition at line 1781 of file mlp_gen.cc.
int LoadWeights | ( | char * | filename, |
int * | iepoch | ||
) |
Definition at line 3022 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::load().
Definition at line 706 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::train().
Definition at line 1757 of file mlp_gen.cc.
Definition at line 1923 of file mlp_gen.cc.
Definition at line 3748 of file mlp_gen.cc.
Definition at line 3682 of file mlp_gen.cc.
Definition at line 3817 of file mlp_gen.cc.
Definition at line 62 of file mlp_gen.cc.
void MLP_Out2 | ( | type_pat * | rrin | ) |
Definition at line 184 of file mlp_gen.cc.
void MLP_Out_T | ( | type_pat * | rrin | ) |
Definition at line 113 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::eval().
int MLP_PrCFun | ( | char * | filename | ) |
Definition at line 2878 of file mlp_gen.cc.
int MLP_PrFFun | ( | char * | filename | ) |
Definition at line 2769 of file mlp_gen.cc.
int MLP_PrintInputStat | ( | ) |
Definition at line 3332 of file mlp_gen.cc.
Definition at line 2131 of file mlp_gen.cc.
void MLP_ResLin | ( | ) |
Definition at line 1971 of file mlp_gen.cc.
int MLP_SetNet | ( | int * | nl, |
int * | nn | ||
) |
Definition at line 3639 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::MLP().
int MLP_StatInputs | ( | int | Nexamples, |
int | Ninputs, | ||
type_pat ** | inputs, | ||
dbl * | mean, | ||
dbl * | sigma, | ||
dbl * | minimum, | ||
dbl * | maximum | ||
) |
Definition at line 3275 of file mlp_gen.cc.
dbl MLP_Stochastic | ( | ) |
Definition at line 518 of file mlp_gen.cc.
dbl MLP_Test | ( | int | ifile, |
int | regul | ||
) |
Definition at line 446 of file mlp_gen.cc.
Definition at line 263 of file mlp_gen.cc.
int MLP_Train | ( | int * | ipat, |
dbl * | err | ||
) |
Definition at line 895 of file mlp_gen.cc.
int NormalizeInputs | ( | ) |
Definition at line 3378 of file mlp_gen.cc.
void PrintWeights | ( | ) |
Definition at line 2168 of file mlp_gen.cc.
int ReadPatterns | ( | char * | filename, |
int | ifile, | ||
int * | inet, | ||
int * | ilearn, | ||
int * | iexamples | ||
) |
Definition at line 2229 of file mlp_gen.cc.
int SaveWeights | ( | char * | filename, |
int | iepoch | ||
) |
Definition at line 2972 of file mlp_gen.cc.
Referenced by PhysicsTools::MLP::save().
void SetDefaultFuncs | ( | ) |
Definition at line 1223 of file mlp_gen.cc.
void SetLambda | ( | double | Wmax | ) |
Definition at line 1949 of file mlp_gen.cc.
int SetTransFunc | ( | int | layer, |
int | neuron, | ||
int | func | ||
) |
Definition at line 1200 of file mlp_gen.cc.
int ShuffleExamples | ( | int | n, |
int * | index | ||
) |
Definition at line 2102 of file mlp_gen.cc.
void SteepestDir | ( | ) |
Definition at line 1244 of file mlp_gen.cc.
int StochStep | ( | ) |
Definition at line 965 of file mlp_gen.cc.
int StochStepHyb | ( | ) |
Definition at line 926 of file mlp_gen.cc.
dbl** BFGSH |
Definition at line 37 of file mlp_gen.cc.
int BFGSMemory = 0 |
Definition at line 27 of file mlp_gen.cc.
dbl* delta |
Definition at line 36 of file mlp_gen.cc.
Referenced by npstat::absDifference(), DQMEventInfo::analyze(), FWPhotonLegoProxyBuilder::build(), FWElectronLegoProxyBuilder::build(), EcalShapeBase::buildMe(), PFRecoTauTagInfoAlgorithm::buildPFTauTagInfo(), MultipleScatteringSimulator::compute(), VolumeEnergyLossEstimator::computeBetheBloch(), ThirdHitPredictionFromInvLine::crossing(), fastProp(), ThirdHitPredictionFromInvParabola::findPointAtCurve(), TAPDPulse::getDelta(), fastTrackingUtilities::hitLocalError(), fftjetcms::LinInterpolatedTable1D::isMonotonous(), HLTTauRefCombiner::match(), HLTTauDQMPlotter::match(), LowPassFilterTiming::operator()(), CSCDetIdSameDetLayerComparator::operator()(), fftjetcms::LinInterpolatedTable1D::operator()(), VertexKinematicConstraint::parametersDerivative(), PetrukhinFunc(), reco::EMIsolatedTauTagInfo::pIsol(), EgammaHLTCaloTowerProducer::produce(), CaloTowerFromL1TCreatorForTauHLT::produce(), CaloTowerCreatorForTauHLT::produce(), tauImpactParameter::ErrorMatrixPropagator::propagateError(), Type1PFMET::run(), MuonHitsChamberResidual::segment_fit(), Cone::side(), reco::IsolatedPixelTrackCandidate::towerIndex(), funct::trapezoid_integral(), VertexKinematicConstraint::value(), and heppy::FSRWeightAlgo::weight().
dbl*** dir |
Definition at line 35 of file mlp_gen.cc.
Referenced by TFileDirectory::_cd(), usedOutput::_getModulesFromOp(), printPaths::_printOp(), LayerCrossingSide::barrelSide(), HiggsValidation::bookHistograms(), TTbarSpinCorrHepMCAnalyzer::bookHistograms(), FWCSCSegmentProxyBuilder::build(), FWDTSegmentProxyBuilder::buildViewType(), CalculatePt_FullPrecision(), evf::DirManager::checkDirEmpty(), SignedDecayLength3D::closestApproachToJet(), MultipleScatteringGeometry::detLayers(), HelixArbitraryPlaneCrossing2Order::direction(), TangentHelix::directionAtVertex(), BeamHaloPropagator::directionCheck(), FWLiteEnabler::enable(), DQMHistNormalizer::endRun(), ZGlobalVsSAIsolationAnalyzer::evaluate(), evf::DirManager::findHighestRun(), evf::DirManager::findHighestRunDir(), evf::DirManager::findRunDir(), getObject(), HelixBarrelPlaneCrossing2OrderLocal::HelixBarrelPlaneCrossing2OrderLocal(), CosmicTrackingRegion::hits_(), StraightLinePropagator::jacobian(), L1TMuonEndCapForestESProducer::L1TMuonEndCapForestESProducer(), L3NominalEfficiencyConfigurator::L3NominalEfficiencyConfigurator(), main(), PropagationDirectionChooser::operator()(), HelixBarrelPlaneCrossing2OrderLocal::positionOnly(), ClusterShape::processColumn(), StraightLinePropagatorESProducer::produce(), AnalyticalPropagatorESProducer::produce(), SteppingHelixPropagatorESProducer::produce(), PropagatorWithMaterialESProducer::produce(), GeantPropagatorESProducer::produce(), FWViewBase::promptForSaveImageTo(), StraightLinePropagator::propagateParametersOnCylinder(), Styles::SavePlot(), DTSegmentCand::setDirection(), DTRecSegment4D::setDirection(), DTRecSegment2D::setDirection(), Benchmark::setDirectory(), TrajectorySeed::swap(), reco::JetSignalVertexCompatibilityAlgo::trackVertexCompat(), DTTrigGeomUtils::trigDir(), rerunParticleFlow::updateInputTags(), muonisolation::PixelTrackExtractor::veto(), muonisolation::TrackExtractor::veto(), muonisolation::CandViewExtractor::veto(), muonisolation::TrackExtractor::vetos(), muonisolation::PixelTrackExtractor::vetos(), PhysicsTools::TrainerMonitoring::write(), and TH1Store::write().
int* ExamplesIndex |
Definition at line 40 of file mlp_gen.cc.
int ExamplesMemory = 0 |
Definition at line 24 of file mlp_gen.cc.
dbl* Gamma |
Definition at line 38 of file mlp_gen.cc.
dbl** Hessian |
Definition at line 41 of file mlp_gen.cc.
dbl** JacobianMatrix |
Definition at line 39 of file mlp_gen.cc.
int JacobianMemory = 0 |
Definition at line 28 of file mlp_gen.cc.
dbl LastAlpha = 0 |
Definition at line 32 of file mlp_gen.cc.
int LearnMemory = 0 |
Definition at line 29 of file mlp_gen.cc.
int MessLang = 0 |
Definition at line 22 of file mlp_gen.cc.
Definition at line 16 of file mlp_gen.cc.
float MLPfitVersion = (float) 1.40 |
Definition at line 31 of file mlp_gen.cc.
int NetMemory = 0 |
Definition at line 30 of file mlp_gen.cc.
int NLineSearchFail = 0 |
Definition at line 33 of file mlp_gen.cc.
int OutputWeights = 100 |
Definition at line 23 of file mlp_gen.cc.
int PatMemory = {0,0} |
Definition at line 26 of file mlp_gen.cc.
int WeightsMemory = 0 |
Definition at line 25 of file mlp_gen.cc.