Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes
xgboost::metric::EvalRankWithCache< Cache > Class Template Referenceabstract
Inheritance diagram for xgboost::metric::EvalRankWithCache< Cache >:
xgboost::Metric xgboost::Configurable

Public Member Functions

 EvalRankWithCache (StringView name, const char *param)
 
void Configure (Args const &) override
 Configure the Metric with the specified parameters.
 
void LoadConfig (Json const &in) override
 Load configuration from JSON object.
 
void SaveConfig (Json *p_out) const override
 Save configuration to JSON object.
 
double Evaluate (HostDeviceVector< float > const &preds, std::shared_ptr< DMatrix > p_fmat) override
 Evaluate a metric with DMatrix as input.
 
const char * Name () const override
 
virtual double Eval (HostDeviceVector< float > const &preds, MetaInfo const &info, std::shared_ptr< Cache > p_cache)=0
 
- Public Member Functions inherited from xgboost::Metric
void LoadConfig (Json const &) override
 Load configuration from JSON object By default, metric has no internal configuration; override this function to maintain internal configuration.
 
void SaveConfig (Json *p_out) const override
 Save configuration to JSON object By default, metric has no internal configuration; override this function to maintain internal configuration.
 
 ~Metric () override=default
 virtual destructor
 

Protected Attributes

ltr::LambdaRankParam param_
 
bool minus_ {false}
 
std::string name_
 
DMatrixCache< Cachecache_ {DMatrixCache<Cache>::DefaultSize()}
 
- Protected Attributes inherited from xgboost::Metric
Context const * ctx_ {nullptr}
 

Additional Inherited Members

- Static Public Member Functions inherited from xgboost::Metric
static MetricCreate (const std::string &name, Context const *ctx)
 create a metric according to name.
 

Member Function Documentation

◆ Configure()

template<typename Cache >
void xgboost::metric::EvalRankWithCache< Cache >::Configure ( Args const &  )
inlineoverridevirtual

Configure the Metric with the specified parameters.

Parameters
argsarguments to the objective function.

Reimplemented from xgboost::Metric.

◆ Evaluate()

template<typename Cache >
double xgboost::metric::EvalRankWithCache< Cache >::Evaluate ( HostDeviceVector< float > const &  preds,
std::shared_ptr< DMatrix p_fmat 
)
inlineoverridevirtual

Evaluate a metric with DMatrix as input.

Parameters
predsPrediction
p_fmatDMatrix that contains related information like labels.

Implements xgboost::Metric.

◆ LoadConfig()

template<typename Cache >
void xgboost::metric::EvalRankWithCache< Cache >::LoadConfig ( Json const &  in)
inlineoverridevirtual

Load configuration from JSON object.

Parameters
inJSON object containing the configuration

Implements xgboost::Configurable.

◆ Name()

template<typename Cache >
const char * xgboost::metric::EvalRankWithCache< Cache >::Name ( ) const
inlineoverridevirtual
Returns
name of metric

Implements xgboost::Metric.

◆ SaveConfig()

template<typename Cache >
void xgboost::metric::EvalRankWithCache< Cache >::SaveConfig ( Json out) const
inlineoverridevirtual

Save configuration to JSON object.

Parameters
outpointer to output JSON object

Implements xgboost::Configurable.


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