Set model predictions postprocessing type.
| 91 | |
| 92 | // Set model predictions postprocessing type. |
| 93 | void 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 | |
| 110 | Napi::Value TModel::CalcPrediction(const Napi::CallbackInfo& info) { |
| 111 | Napi::Env env = info.Env(); |
nothing calls this directly
no test coverage detected