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

Function CalcModel

library/cpp/testing/benchmark/bench.cpp:178–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 };
177
178 TLinFunc CalcModel(const TSamples& s) {
179 TKahanSLRSolver solver;
180
181 for (const auto& p : s) {
182 solver.Add(p.first, p.second);
183 }
184
185 double c = 0;
186 double i = 0;
187
188 solver.Solve(c, i);
189
190 return TLinFunc{c, i};
191 }
192
193 inline TSamples RemoveOutliers(const TSamples& s, double fraction) {
194 if (s.size() < 20) {

Callers 2

RemoveOutliersFunction · 0.85
RunTestFunction · 0.85

Calls 2

AddMethod · 0.45
SolveMethod · 0.45

Tested by

no test coverage detected