Use double precision in metric calculation. (#7364)

This commit is contained in:
Jiaming Yuan
2021-11-02 12:00:32 +08:00
committed by GitHub
parent 239dbb3c0a
commit 0f7a9b42f1
11 changed files with 219 additions and 224 deletions

View File

@@ -58,9 +58,8 @@ class Metric : public Configurable {
* the average statistics across all the node,
* this is only supported by some metrics
*/
virtual bst_float Eval(const HostDeviceVector<bst_float>& preds,
const MetaInfo& info,
bool distributed) = 0;
virtual double Eval(const HostDeviceVector<bst_float> &preds,
const MetaInfo &info, bool distributed) = 0;
/*! \return name of metric */
virtual const char* Name() const = 0;
/*! \brief virtual destructor */