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

Method Add

library/cpp/linear_regression/welford.cpp:9–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7}
8
9void TMeanCalculator::Add(const double value, const double weight /*= 1.*/) {
10 SumWeights += weight;
11 if (SumWeights.Get()) {
12 Mean += weight * (value - Mean) / SumWeights.Get();
13 }
14}
15
16void TMeanCalculator::Remove(const double value, const double weight /*= 1.*/) {
17 SumWeights -= weight;

Callers 9

MakeUnimodalFunction · 0.45
Y_UNIT_TESTFunction · 0.45
SLRTestFunction · 0.45
LinearRegressionTestFunction · 0.45
TransformationTestFunction · 0.45
QualityBenchmarkFunction · 0.45
SpeedBenchmarkFunction · 0.45
WriteDataMethod · 0.45
ReopenLogMethod · 0.45

Calls 2

GetMeanMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected