#ifndef ROOT_TMVA_MethodKNN
#define ROOT_TMVA_MethodKNN
#include <vector>
#include <map>
#ifndef ROOT_TMVA_MethodBase
#include "TMVA/MethodBase.h"
#endif
#ifndef ROOT_TMVA_KNN_ModulekNN
#include "TMVA/ModulekNN.h"
#endif
namespace TMVA
{
namespace kNN
{
class ModulekNN;
}
class MethodKNN : public MethodBase
{
public:
MethodKNN(const TString& jobName,
const TString& methodTitle,
DataSet& theData,
const TString& theOption = "KNN",
TDirectory* theTargetDir = NULL);
MethodKNN(DataSet& theData,
const TString& theWeightFile,
TDirectory* theTargetDir = NULL);
virtual ~MethodKNN( void );
void Train( void );
Double_t GetMvaValue();
using MethodBase::WriteWeightsToStream;
using MethodBase::ReadWeightsFromStream;
void WriteWeightsToStream(std::ostream& o) const;
void WriteWeightsToStream(TFile& rf) const;
void ReadWeightsFromStream(std::istream& istr);
void ReadWeightsFromStream(TFile &rf);
const Ranking* CreateRanking();
protected:
void MakeClassSpecific( std::ostream&, const TString& ) const;
void GetHelpMessage() const;
private:
void DeclareOptions();
void ProcessOptions();
void InitKNN( void );
void MakeKNN( void );
double PolKernel(double value) const;
private:
Double_t fSumOfWeightsS;
Double_t fSumOfWeightsB;
kNN::ModulekNN *fModule;
Int_t fnkNN;
Int_t fTreeOptDepth;
Float_t fScaleFrac;
Bool_t fUseKernel;
Bool_t fTrim;
kNN::EventVec fEvent;
ClassDef(MethodKNN,0)
};
}
#endif // MethodKNN
Last change: Sat Nov 1 10:21:48 2008
Last generated: 2008-11-01 10:21
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.