Warning, file /include/root/TMVA/MethodFDA.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 #ifndef ROOT_TMVA_MethodFDA
0032 #define ROOT_TMVA_MethodFDA
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049 #include "TMVA/MethodBase.h"
0050 #include "TMVA/IFitterTarget.h"
0051 #include <vector>
0052
0053 class TFormula;
0054
0055 namespace TMVA {
0056
0057 class Interval;
0058 class Event;
0059 class FitterBase;
0060
0061 class MethodFDA : public MethodBase, public IFitterTarget {
0062
0063 public:
0064
0065 MethodFDA( const TString& jobName,
0066 const TString& methodTitle,
0067 DataSetInfo& theData,
0068 const TString& theOption = "");
0069
0070 MethodFDA( DataSetInfo& theData,
0071 const TString& theWeightFile);
0072
0073 virtual ~MethodFDA( void );
0074
0075 Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets ) override;
0076
0077
0078 void Train( void ) override;
0079
0080 using MethodBase::ReadWeightsFromStream;
0081
0082 void AddWeightsXMLTo ( void* parent ) const override;
0083
0084 void ReadWeightsFromStream( std::istream & i ) override;
0085 void ReadWeightsFromXML ( void* wghtnode ) override;
0086
0087
0088 Double_t GetMvaValue( Double_t* err = nullptr, Double_t* errUpper = nullptr ) override;
0089
0090 const std::vector<Float_t>& GetRegressionValues() override;
0091 const std::vector<Float_t>& GetMulticlassValues() override;
0092
0093 void Init( void ) override;
0094
0095
0096 const Ranking* CreateRanking() override { return nullptr; }
0097
0098 Double_t EstimatorFunction( std::vector<Double_t>& ) override;
0099
0100
0101 void CheckSetup() override {}
0102
0103 protected:
0104
0105
0106 void MakeClassSpecific( std::ostream&, const TString& ) const override;
0107
0108
0109 void GetHelpMessage() const override;
0110
0111 private:
0112
0113
0114 void CalculateMulticlassValues( const TMVA::Event*& evt, std::vector<Double_t>& parameters, std::vector<Float_t>& values);
0115
0116
0117
0118 void CreateFormula ();
0119 Double_t InterpretFormula( const Event*, std::vector<Double_t>::iterator begin, std::vector<Double_t>::iterator end );
0120
0121
0122 void ClearAll();
0123
0124
0125 void PrintResults( const TString&, std::vector<Double_t>&, const Double_t ) const;
0126
0127
0128 void DeclareOptions() override;
0129 void ProcessOptions() override;
0130
0131 TString fFormulaStringP;
0132 TString fParRangeStringP;
0133 TString fFormulaStringT;
0134 TString fParRangeStringT;
0135
0136 TFormula* fFormula;
0137 UInt_t fNPars;
0138 std::vector<Interval*> fParRange;
0139 std::vector<Double_t> fBestPars;
0140 TString fFitMethod;
0141 TString fConverger;
0142 FitterBase* fFitter;
0143 IFitterTarget* fConvergerFitter;
0144
0145
0146
0147 Double_t fSumOfWeightsSig;
0148 Double_t fSumOfWeightsBkg;
0149 Double_t fSumOfWeights;
0150
0151
0152 Int_t fOutputDimensions;
0153
0154 ClassDefOverride(MethodFDA,0);
0155 };
0156
0157 }
0158
0159 #endif