| 531 | } |
| 532 | |
| 533 | void 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 | |
| 560 | TIndependentTreeShapParams::TIndependentTreeShapParams( |
| 561 | const TFullModel& model, |
nothing calls this directly
no test coverage detected