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

Function GetFeatureImportancesMulti

catboost/libs/fstr/calc_fstr.cpp:552–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552TVector<TVector<TVector<double>>> GetFeatureImportancesMulti(
553 const EFstrType fstrType,
554 const TFullModel& model,
555 const TDataProviderPtr dataset,
556 const TDataProviderPtr referenceDataset, // can be nullptr
557 int threadCount,
558 EPreCalcShapValues mode,
559 int logPeriod,
560 ECalcTypeShapValues calcType,
561 EExplainableModelOutput modelOutputType)
562{
563 TSetLoggingVerboseOrSilent inThisScope(logPeriod);
564 CB_ENSURE(model.GetTreeCount(), "Model is not trained");
565
566 CB_ENSURE(fstrType == EFstrType::ShapValues, "Only shap values can provide multi approxes.");
567
568 CB_ENSURE(dataset, "Dataset is not provided");
569 CheckModelAndDatasetCompatibility(model, *dataset->ObjectsData.Get());
570
571 NPar::TLocalExecutor localExecutor;
572 localExecutor.RunAdditionalThreads(threadCount - 1);
573
574 return CalcShapValuesMulti(
575 model,
576 *dataset,
577 referenceDataset,
578 /*fixedFeatureParams*/ Nothing(),
579 logPeriod,
580 mode,
581 &localExecutor,
582 calcType,
583 modelOutputType
584 );
585}
586
587TVector<TVector<TVector<TVector<double>>>> CalcShapFeatureInteractionMulti(
588 const EFstrType fstrType,

Callers 1

Calls 6

CalcShapValuesMultiFunction · 0.85
NothingFunction · 0.85
RunAdditionalThreadsMethod · 0.80
GetTreeCountMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected