Belle II Software prerelease-11-00-00d
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 FastBDTOptions & getBaseClassifierOptions () const
 Return options of the base classifier (const version)
 
FastBDTOptions & getBaseClassifierOptions ()
 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{
223 return m_baseClassifierOptions;
224}

◆ getBaseClassifierOptions() [2/2]

const FastBDTOptions & getBaseClassifierOptions ( ) const
inherited

Return options of the base classifier (const version)

Definition at line 46 of file Regression.h.

216{
217 return m_baseClassifierOptions;
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}

◆ getMaximalBinNumber()

unsigned int getMaximalBinNumber ( ) const
inherited

Return the number of bins to use.

Definition at line 52 of file Regression.h.

204{
205 return m_numberOfBins;
206}

◆ 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}

◆ 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: