Belle II Software light-2406-ragdoll
RegressionFastBDTOptions Class Reference

Explicit template specification for FastBDTs for regression options. More...

#include <RegressionFastBDT.h>

Inheritance diagram for RegressionFastBDTOptions:
Collaboration diagram for RegressionFastBDTOptions:

Public Member Functions

std::string getMethod () const override
 Return a correct name for this method.
 
void load (const boost::property_tree::ptree &pt) override
 Load the options from a boost property tree. Only loads the maximal bin number.
 
void save (boost::property_tree::ptree &pt) const override
 Save the options from a boost property tree. Only saves the maximal bin number.
 
po::options_description getDescription () override
 Get the descriptions for these options.
 
const FastBDTOptionsgetBaseClassifierOptions () const
 Return options of the base classifier (const version)
 
FastBDTOptionsgetBaseClassifierOptions ()
 Return options of the base classifier (non-const version)
 
unsigned int getMaximalBinNumber () const
 Return the number of bins to use.
 
void setMaximalBinNumber (unsigned int maximalBinNumber)
 Set the number of bins to use.
 

Private Attributes

FastBDTOptions m_baseClassifierOptions
 Options of the base classifier.
 
unsigned int m_numberOfBins
 How many bins to use.
 

Detailed Description

Explicit template specification for FastBDTs for regression options.

Definition at line 22 of file RegressionFastBDT.h.

Member Function Documentation

◆ getBaseClassifierOptions() [1/2]

FastBDTOptions & getBaseClassifierOptions
inherited

Return options of the base classifier (non-const version)

Definition at line 49 of file Regression.h.

222{
224}
FastBDTOptions m_baseClassifierOptions
Options of the base classifier.
Definition: Regression.h:59

◆ getBaseClassifierOptions() [2/2]

const FastBDTOptions & getBaseClassifierOptions
inherited

Return options of the base classifier (const version)

Definition at line 46 of file Regression.h.

216{
218}

◆ getDescription()

po::options_description getDescription
overridevirtualinherited

Get the descriptions for these options.

Implements Options.

Definition at line 43 of file Regression.h.

234{
235 auto description = getBaseClassifierOptions().getDescription();
236
237 description.add_options()
238 ("numberOfBins", po::value<unsigned int>(&m_numberOfBins),
239 "Number of bins to split the target variable into");
240
241 return description;
242}
virtual po::options_description getDescription() override
Returns a program options description for all available options.
Definition: FastBDT.cc:89
const FastBDTOptions & getBaseClassifierOptions() const
Return options of the base classifier (const version)
Definition: Regression.h:215

◆ getMaximalBinNumber()

unsigned int getMaximalBinNumber
inherited

Return the number of bins to use.

Definition at line 52 of file Regression.h.

204{
205 return m_numberOfBins;
206}
unsigned int m_numberOfBins
How many bins to use.
Definition: Regression.h:61

◆ getMethod()

std::string getMethod ( ) const
inlineoverridevirtual

Return a correct name for this method.

Implements SpecificOptions.

Definition at line 25 of file RegressionFastBDT.h.

25{ return "RegressionFastBDT"; }

◆ load()

void load ( const boost::property_tree::ptree &  pt)
overridevirtualinherited

Load the options from a boost property tree. Only loads the maximal bin number.

Implements Options.

Definition at line 37 of file Regression.h.

198{
199 m_numberOfBins = pt.get<unsigned int>(getMethod() + "_numberOfBins");
200}
virtual std::string getMethod() const =0
Returns method name, used in the interface to register the method.

◆ save()

void save ( boost::property_tree::ptree &  pt) const
overridevirtualinherited

Save the options from a boost property tree. Only saves the maximal bin number.

Implements Options.

Definition at line 40 of file Regression.h.

228{
229 pt.put(getMethod() + "_numberOfBins", m_numberOfBins);
230}

◆ setMaximalBinNumber()

void setMaximalBinNumber ( unsigned int  maximalBinNumber)
inherited

Set the number of bins to use.

Definition at line 55 of file Regression.h.

210{
211 m_numberOfBins = maximalBinNumber;
212}

Member Data Documentation

◆ m_baseClassifierOptions

FastBDTOptions m_baseClassifierOptions
privateinherited

Options of the base classifier.

Definition at line 59 of file Regression.h.

◆ m_numberOfBins

unsigned int m_numberOfBins
privateinherited

How many bins to use.

Definition at line 61 of file Regression.h.


The documentation for this class was generated from the following file: