| 550 | } |
| 551 | |
| 552 | TVector<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 | |
| 587 | TVector<TVector<TVector<TVector<double>>>> CalcShapFeatureInteractionMulti( |
| 588 | const EFstrType fstrType, |
no test coverage detected