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

Function CalcShapFeatureInteractionMulti

catboost/libs/fstr/calc_fstr.cpp:587–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587TVector<TVector<TVector<TVector<double>>>> CalcShapFeatureInteractionMulti(
588 const EFstrType fstrType,
589 const TFullModel& model,
590 const NCB::TDataProviderPtr dataset,
591 const TMaybe<std::pair<int, int>>& pairOfFeatures,
592 int threadCount,
593 EPreCalcShapValues mode,
594 int logPeriod,
595 ECalcTypeShapValues calcType)
596{
597 ValidateFeatureInteractionParams(fstrType, model, dataset, calcType);
598 if (pairOfFeatures.Defined()) {
599 const int flatFeatureCount = SafeIntegerCast<int>(dataset->MetaInfo.GetFeatureCount());
600 ValidateFeaturePair(flatFeatureCount, pairOfFeatures.GetRef());
601 }
602
603 NPar::TLocalExecutor localExecutor;
604 localExecutor.RunAdditionalThreads(threadCount - 1);
605
606 return CalcShapInteractionValuesMulti(
607 model,
608 *dataset,
609 pairOfFeatures,
610 logPeriod,
611 mode,
612 &localExecutor,
613 calcType
614 );
615}
616
617TVector<TString> GetMaybeGeneratedModelFeatureIds(
618 const TFullModel& model,

Callers

nothing calls this directly

Calls 7

ValidateFeaturePairFunction · 0.85
RunAdditionalThreadsMethod · 0.80
DefinedMethod · 0.45
GetFeatureCountMethod · 0.45
GetRefMethod · 0.45

Tested by

no test coverage detected