| 622 | // https://pdfs.semanticscholar.org/72f1/5aba2e67b1cc9cd1fb12c99e101c4c1aae4b.pdf |
| 623 | |
| 624 | int argmin(const std::unordered_map<int, float>& m) { |
| 625 | int c = -1; |
| 626 | float f = FLT_MAX; |
| 627 | for (const auto it : m) { |
| 628 | if (it.second < f) { |
| 629 | f = it.second; |
| 630 | c = it.first; |
| 631 | } |
| 632 | } |
| 633 | return c; |
| 634 | } |
| 635 | |
| 636 | void FixedSizeClassStats::accumulate(int c, float w) { |
| 637 | auto it = class_weights_.find(c); |
no outgoing calls
no test coverage detected