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

Method Remove

library/cpp/linear_regression/welford.cpp:16–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16void TMeanCalculator::Remove(const double value, const double weight /*= 1.*/) {
17 SumWeights -= weight;
18 if (SumWeights.Get()) {
19 Mean -= weight * (value - Mean) / SumWeights.Get();
20 }
21}
22
23double TMeanCalculator::GetMean() const {
24 return Mean;

Callers 1

Y_UNIT_TESTFunction · 0.45

Calls 2

GetMeanMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected