MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / SafeLog

Function SafeLog

include/LightGBM/utils/common.h:914–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912
913template <typename T>
914static T SafeLog(T x) {
915 if (x > 0) {
916 return std::log(x);
917 } else {
918 return -INFINITY;
919 }
920}
921
922inline bool CheckASCII(const std::string& s) {
923 for (auto c : s) {

Callers 3

BoostFromScoreMethod · 0.50
LossOnPointMethod · 0.50
LossOnPointMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected