| 5 | |
| 6 | namespace 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, |
no test coverage detected