MCPcopy Create free account
hub / github.com/catboost/catboost / CheckContainsOnlyIntegers

Function CheckContainsOnlyIntegers

catboost/libs/data/target.cpp:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static void CheckContainsOnlyIntegers(const ITypedSequence<float>& typedSequence) {
46 typedSequence.ForEach(
47 [] (float value) {
48 float integerPart;
49 CB_ENSURE_INTERNAL(
50 std::modf(value, &integerPart) == 0.0f,
51 "targetType is Integer but target values contain non-integer data"
52 );
53 }
54 );
55}
56
57
58static void CheckRawTarget(ERawTargetType targetType, const TVector<TRawTarget>& target, ui32 objectCount) {

Callers 1

CheckRawTargetFunction · 0.85

Calls 2

modfFunction · 0.50
ForEachMethod · 0.45

Tested by

no test coverage detected