ioeric added inline comments.
================ Comment at: clangd/Quality.cpp:200 + // f = 12.0 + // boost = f * sigmoid(m * std::log(References)) - 0.5 * f + 0.59 + // Sample data points: (10, 1.00), (100, 1.41), (1000, 1.82), ---------------- ilya-biryukov wrote: > Made add references or intuition on why this boosting function is good? > Also on why can't we use the original boost function and need to simplify it? Turned out "simplification" might be the wrong word. Improved the comment a bit. ================ Comment at: clangd/Quality.cpp:203 + // (10K, 2.21), (100K, 2.58), (1M, 2.94) + float s = 1.0 / std::pow(References, 0.06); + Score *= 6.0 * (1 - s) / (1 + s) + 0.59; ---------------- ilya-biryukov wrote: > Any reason to not use `std::pow(References, -0.06)` instead? > (not a suggestion to actually change the code, just wondering if there are > any reasons (apart from personal preferences) to prefer one over the other) Nope, no particular reason. Positive exponent looks a bit nicer in formula, but I think it's fine here. Switched to `std::pow(References, -0.06)`. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49780 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits