lint learner finish

This commit is contained in:
tqchen
2015-07-03 19:20:45 -07:00
parent 1581de08da
commit aba41d07cd
8 changed files with 127 additions and 112 deletions

View File

@@ -1,10 +1,12 @@
#ifndef XGBOOST_LEARNER_HELPER_UTILS_H_
#define XGBOOST_LEARNER_HELPER_UTILS_H_
/*!
* Copyright 2014 by Contributors
* \file helper_utils.h
* \brief useful helper functions
* \author Tianqi Chen, Kailong Chen
*/
#ifndef XGBOOST_LEARNER_HELPER_UTILS_H_
#define XGBOOST_LEARNER_HELPER_UTILS_H_
#include <utility>
#include <vector>
#include <cmath>
@@ -61,7 +63,7 @@ inline float LogSum(const float *rec, size_t size) {
for (size_t i = 0; i < size; ++i) {
sum += std::exp(rec[i] - mx);
}
return mx + std::log(sum);
return mx + std::log(sum);
}
inline static bool CmpFirst(const std::pair<float, unsigned> &a,