| 23 | } |
| 24 | |
| 25 | static double GetTotalWeight(const TPolynom& polynom) { |
| 26 | for (const auto& [structure, stat] : polynom.MonomsEnsemble) { |
| 27 | if (structure.Splits.empty()) { |
| 28 | return stat.Weight; |
| 29 | } |
| 30 | } |
| 31 | CB_ENSURE(false, "Failed to get total weight"); |
| 32 | } |
| 33 | |
| 34 | static TVector<TVector<double>> GetBorderWeights(const TPolynom& polynom, const IGrid& grid) { |
| 35 | TVector<TVector<double>> weightForBorder(grid.FeatureCount()); |
no test coverage detected