| 833 | } |
| 834 | |
| 835 | CATBOOST_API bool PredictSpecificClassSingle( |
| 836 | ModelCalcerHandle* modelHandle, |
| 837 | const float* floatFeatures, size_t floatFeaturesSize, |
| 838 | const char** catFeatures, size_t catFeaturesSize, |
| 839 | int classId, |
| 840 | double* result, size_t resultSize) { |
| 841 | try { |
| 842 | const size_t dim = FULL_MODEL_PTR(modelHandle)->GetDimensionsCount(); |
| 843 | TVector<double> rawResult(dim); |
| 844 | if (!CalcModelPredictionSingle( |
| 845 | modelHandle, |
| 846 | floatFeatures, floatFeaturesSize, |
| 847 | catFeatures, catFeaturesSize, |
| 848 | rawResult.data(), rawResult.size())) |
| 849 | { |
| 850 | return false; |
| 851 | } |
| 852 | GetSpecificClass(classId, rawResult, dim, TArrayRef<double>(result, resultSize)); |
| 853 | } catch (...) { |
| 854 | ErrorMessageHolder.Get().Message = CurrentExceptionMessage(); |
| 855 | return false; |
| 856 | } |
| 857 | return true; |
| 858 | } |
| 859 | |
| 860 | CATBOOST_API bool PredictSpecificClassWithHashedCatFeatures( |
| 861 | ModelCalcerHandle* modelHandle, |
nothing calls this directly
no test coverage detected