interface of evaluation metric used to evaluate model performance. This has nothing to do with training, but merely act as evaluation purpose.
More...
#include <metric.h>
|
virtual void | Configure (const std::vector< std::pair< std::string, std::string > > &) |
| Configure the Metric with the specified parameters. More...
|
|
void | LoadConfig (Json const &) override |
| Load configuration from JSON object By default, metric has no internal configuration; override this function to maintain internal configuration. More...
|
|
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. More...
|
|
virtual double | Evaluate (HostDeviceVector< bst_float > const &preds, std::shared_ptr< DMatrix > p_fmat)=0 |
| Evaluate a metric with DMatrix as input. More...
|
|
virtual const char * | Name () const =0 |
|
| ~Metric () override=default |
| virtual destructor More...
|
|
virtual | ~Configurable ()=default |
|
interface of evaluation metric used to evaluate model performance. This has nothing to do with training, but merely act as evaluation purpose.
◆ ~Metric()
xgboost::Metric::~Metric |
( |
| ) |
|
|
overridedefault |
◆ Configure()
virtual void xgboost::Metric::Configure |
( |
const std::vector< std::pair< std::string, std::string > > & |
| ) |
|
|
inlinevirtual |
Configure the Metric with the specified parameters.
- Parameters
-
args | arguments to the objective function. |
◆ Create()
static Metric* xgboost::Metric::Create |
( |
const std::string & |
name, |
|
|
Context const * |
ctx |
|
) |
| |
|
static |
create a metric according to name.
- Parameters
-
name | name of the metric. name can be in form metric[@]param and the name will be matched in the registry. |
ctx | A global context |
- Returns
- the created metric.
◆ Evaluate()
Evaluate a metric with DMatrix as input.
- Parameters
-
preds | Prediction |
p_fmat | DMatrix that contains related information like labels. |
◆ LoadConfig()
void xgboost::Metric::LoadConfig |
( |
Json const & |
| ) |
|
|
inlineoverridevirtual |
Load configuration from JSON object By default, metric has no internal configuration; override this function to maintain internal configuration.
- Parameters
-
in | JSON object containing the configuration |
Implements xgboost::Configurable.
◆ Name()
virtual const char* xgboost::Metric::Name |
( |
| ) |
const |
|
pure virtual |
◆ SaveConfig()
void xgboost::Metric::SaveConfig |
( |
Json * |
p_out | ) |
const |
|
inlineoverridevirtual |
Save configuration to JSON object By default, metric has no internal configuration; override this function to maintain internal configuration.
- Parameters
-
out | pointer to output JSON object |
Implements xgboost::Configurable.
◆ ctx_
Context const* xgboost::Metric::ctx_ {nullptr} |
|
protected |
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/xgboost/checkouts/stable/include/xgboost/metric.h