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

Method SetPredictionType

catboost/node-package/src/model.cpp:93–108  ·  view source on GitHub ↗

Set model predictions postprocessing type.

Source from the content-addressed store, hash-verified

91
92// Set model predictions postprocessing type.
93void TModel::SetPredictionType(const Napi::CallbackInfo& info) {
94 Napi::Env env = info.Env();
95
96 if (!NHelper::Check(env, info.Length() >= 1, "Wrong number of arguments") ||
97 !NHelper::Check(env, info[0].IsString(), "predictionType argument must have string type"))
98 {
99 return;
100 }
101
102 NHelper::CheckNotNullHandle(env, this->Handle);
103 const bool status = SetPredictionTypeString(
104 this->Handle,
105 info[0].As<Napi::String>().Utf8Value().c_str()
106 );
107 NHelper::CheckStatus(env, status);
108}
109
110Napi::Value TModel::CalcPrediction(const Napi::CallbackInfo& info) {
111 Napi::Env env = info.Env();

Callers

nothing calls this directly

Calls 7

CheckNotNullHandleFunction · 0.85
SetPredictionTypeStringFunction · 0.85
CheckStatusFunction · 0.85
CheckFunction · 0.70
LengthMethod · 0.45
IsStringMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected