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

Method InitTransformedData

catboost/libs/fstr/independent_tree_shap.cpp:533–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533void TIndependentTreeShapParams::InitTransformedData(
534 const TFullModel& model,
535 const TDataProvider& dataset,
536 const NCatboostOptions::TLossDescription& metricDescription,
537 NPar::ILocalExecutor* localExecutor
538) {
539 switch (ModelOutputType)
540 {
541 case EExplainableModelOutput::Probability: {
542 TransformedTargetOfDataset =
543 ApplyModelMulti(model, *dataset.ObjectsData, EPredictionType::Probability, 0, 0, localExecutor, dataset.RawTargetData.GetBaseline());
544 break;
545 }
546 case EExplainableModelOutput::LossFunction : {
547 Metric = CreateMetricFromDescription(metricDescription, model.GetDimensionsCount()).front().Release();
548 TransformedTargetOfDataset = GetTransformedTarget(
549 ApproxOfDataset,
550 TargetOfDataset,
551 *Metric
552 );
553 break;
554 }
555 default:
556 CB_ENSURE_INTERNAL(false, "Unexpected model output type for transforming data");
557 }
558}
559
560TIndependentTreeShapParams::TIndependentTreeShapParams(
561 const TFullModel& model,

Callers

nothing calls this directly

Calls 7

ApplyModelMultiFunction · 0.85
GetTransformedTargetFunction · 0.85
GetBaselineMethod · 0.45
ReleaseMethod · 0.45
frontMethod · 0.45
GetDimensionsCountMethod · 0.45

Tested by

no test coverage detected