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

Method ComputeStats

catboost/cuda/targets/multiclass_targets.cpp:7–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6namespace NCatboostCuda {
7 TAdditiveStatistic TMultiClassificationTargets<NCudaLib::TStripeMapping>::ComputeStats(const TStripeBuffer<const float>& point) const {
8 TVector<float> result;
9 auto tmp = TVec::Create(point.GetMapping().RepeatOnAllDevices(1));
10
11 ComputeValueAndFirstDer(GetTarget().GetTargets(), GetTarget().GetWeights(), point, &tmp, (TVec*)nullptr);
12
13 NCudaLib::TCudaBufferReader<TVec>(tmp)
14 .SetFactorSlice(TSlice(0, 1))
15 .SetReadSlice(TSlice(0, 1))
16 .ReadReduce(result);
17
18 const double weight = GetTotalWeight();
19 return MakeSimpleAdditiveStatistic(-result[0], weight);
20 }
21
22 void TMultiClassificationTargets<NCudaLib::TStripeMapping>::StochasticDer(const TStripeBuffer<const float>& point,
23 const TStripeBuffer<float>& sampledWeights,

Callers 1

EvalMethod · 0.45

Calls 8

GetTotalWeightFunction · 0.85
GetMappingMethod · 0.80
ReadReduceMethod · 0.80
CreateFunction · 0.50
TSliceClass · 0.50
RepeatOnAllDevicesMethod · 0.45
GetWeightsMethod · 0.45

Tested by

no test coverage detected