Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
LightGBM::BinaryMetric< PointWiseLossCalculator > Class Template Reference

Metric for binary classification task. Use static class "PointWiseLossCalculator" to calculate loss point-wise. More...

#include <binary_metric.hpp>

Inheritance diagram for LightGBM::BinaryMetric< PointWiseLossCalculator >:
LightGBM::Metric

Public Member Functions

 BinaryMetric (const Config &)
 
void Init (const Metadata &metadata, data_size_t num_data) override
 Initialize.
 
const std::vector< std::string > & GetName () const override
 
double factor_to_bigger_better () const override
 
std::vector< double > Eval (const double *score, const ObjectiveFunction *objective) const override
 Calcaluting and printing metric result.
 
- Public Member Functions inherited from LightGBM::Metric
virtual ~Metric ()
 virtual destructor
 
Metricoperator= (const Metric &)=delete
 Disable copy.
 
 Metric (const Metric &)=delete
 Disable copy.
 

Additional Inherited Members

- Static Public Member Functions inherited from LightGBM::Metric
static LIGHTGBM_EXPORT MetricCreateMetric (const std::string &type, const Config &config)
 Create object of metrics.
 

Detailed Description

template<typename PointWiseLossCalculator>
class LightGBM::BinaryMetric< PointWiseLossCalculator >

Metric for binary classification task. Use static class "PointWiseLossCalculator" to calculate loss point-wise.

Member Function Documentation

◆ Eval()

template<typename PointWiseLossCalculator >
std::vector< double > LightGBM::BinaryMetric< PointWiseLossCalculator >::Eval ( const double *  score,
const ObjectiveFunction objective 
) const
inlineoverridevirtual

Calcaluting and printing metric result.

Parameters
scoreCurrent prediction score

Implements LightGBM::Metric.

◆ factor_to_bigger_better()

template<typename PointWiseLossCalculator >
double LightGBM::BinaryMetric< PointWiseLossCalculator >::factor_to_bigger_better ( ) const
inlineoverridevirtual

Implements LightGBM::Metric.

◆ GetName()

template<typename PointWiseLossCalculator >
const std::vector< std::string > & LightGBM::BinaryMetric< PointWiseLossCalculator >::GetName ( ) const
inlineoverridevirtual

Implements LightGBM::Metric.

◆ Init()

template<typename PointWiseLossCalculator >
void LightGBM::BinaryMetric< PointWiseLossCalculator >::Init ( const Metadata metadata,
data_size_t  num_data 
)
inlineoverridevirtual

Initialize.

Parameters
test_nameSpecific name for this metric, will output on log
metadataLabel data
num_dataNumber of data

Implements LightGBM::Metric.


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