#include "TMVA/MethodVariable.h"
#include <algorithm>
ClassImp(TMVA::MethodVariable)
using std::endl;
TMVA::MethodVariable::MethodVariable( const TString& jobName, const TString& methodTitle, DataSet& theData,
const TString& theOption, TDirectory* theTargetDir )
: TMVA::MethodBase( jobName, methodTitle, theData, theOption, theTargetDir )
{
SetMethodName( "Variable" );
SetMethodType( TMVA::Types::kVariable );
SetTestvarPrefix( "" );
SetTestvarName();
fLogger << kVERBOSE << "uses as discriminating variable just "
<< GetOptions() << " as specified in the option" << Endl;
if (0 == Data().GetTrainingTree()->FindBranch(GetOptions())) {
Data().GetTrainingTree()->Print();
fLogger << kFATAL << "variable " << GetOptions() << " not found in tree" << Endl;
}
else {
SetMethodName ( GetMethodName() + (TString)"_" + GetOptions() );
SetTestvarName( GetOptions() );
fLogger << kVERBOSE << "sucessfully initialized variable as " << GetMethodName() << Endl;
}
}
TMVA::MethodVariable::~MethodVariable( void )
{
}
void TMVA::MethodVariable::Train( void )
{
if (!CheckSanity()) fLogger << kFATAL << "<Train> sanity check failed" << Endl;
}
Double_t TMVA::MethodVariable::GetMvaValue()
{
return GetEventVal(0);
}
void TMVA::MethodVariable::WriteWeightsToStream( ostream & o ) const
{
o << "";
}
void TMVA::MethodVariable::ReadWeightsFromStream( istream & )
{
}
void TMVA::MethodVariable::MakeClassSpecific( std::ostream& fout, const TString& className ) const
{
fout << " // not implemented for class: \"" << className << "\"" << endl;
fout << "};" << endl;
}
void TMVA::MethodVariable::GetHelpMessage() const
{
fLogger << Endl;
fLogger << gTools().Color("bold") << "--- Short description:" << gTools().Color("reset") << Endl;
fLogger << Endl;
fLogger << "<None>" << Endl;
fLogger << Endl;
fLogger << gTools().Color("bold") << "--- Performance optimisation:" << gTools().Color("reset") << Endl;
fLogger << Endl;
fLogger << "<None>" << Endl;
fLogger << Endl;
fLogger << gTools().Color("bold") << "--- Performance tuning via configuration options:" << gTools().Color("reset") << Endl;
fLogger << Endl;
fLogger << "<None>" << Endl;
}
Last change: Wed Jun 25 08:48:40 2008
Last generated: 2008-06-25 08:48
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.