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

Function AvoidInf

include/LightGBM/utils/common.h:684–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682}
683
684inline static double AvoidInf(double x) {
685 if (std::isnan(x)) {
686 return 0.0;
687 } else if (x >= 1e300) {
688 return 1e300;
689 } else if (x <= -1e300) {
690 return -1e300;
691 } else {
692 return x;
693 }
694}
695
696inline static float AvoidInf(float x) {
697 if (std::isnan(x)) {

Callers 6

SetInitScoreMethod · 0.50
SetLabelMethod · 0.50
SetWeightsMethod · 0.50
LoadWeightsMethod · 0.50
LoadInitialScoreMethod · 0.50
NodeToJSONMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected