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

Function GetUnpackedShapValues

catboost/libs/fstr/independent_tree_shap.cpp:367–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367static TVector<double> GetUnpackedShapValues(
368 const TVector<double>& shapValuesInternal,
369 const TVector<TVector<int>>& combinationClassFeatures,
370 size_t flatFeatureCount
371){
372 TVector<double> unpackedShapValues(flatFeatureCount + 1);
373 unpackedShapValues.resize(flatFeatureCount + 1);
374 UnpackInternalShapsForDocumentOneDimension(
375 shapValuesInternal,
376 combinationClassFeatures,
377 &unpackedShapValues
378 );
379 // set mean value
380 unpackedShapValues.back() = shapValuesInternal.back();
381 return unpackedShapValues;
382}
383
384static TVector<TVector<double>> GetProbabilityMeanValues(
385 const TVector<TVector<TVector<double>>>& shapValues, // [refIdx][dim][feature]

Callers 1

Calls 3

resizeMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected