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

Function GetSpecificClass

catboost/libs/model_interface/c_api.cpp:194–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192
193namespace {
194 void GetSpecificClass(int classId, TArrayRef<double> predictions, size_t dim, TArrayRef<double> result) {
195 for (size_t docId = 0; docId < result.size(); ++docId) {
196 result[docId] = predictions[docId * dim + classId];
197 }
198 }
199
200 bool GetFeatureIndices(std::function<TVector<size_t>()> getFeatureIndices, size_t** indices, size_t* count) {
201 try {

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected