Repository navigation
Use the differences in source code metrics in the regressor model - #7596
Merged
Merged
Conversation
Now that the metrics differences are computed from the files before the commits (mozilla#7563), they slightly but consistently improve the model.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that
metrics_diffis computed against the files before each commit (#7563, commits DB v25), theSourceCodeMetricsDifffeatures carry real signal. Before the fix they were meaningless, so the earlier result that they didn't help no longer holds.Evaluation: production
RegressorModelpipeline (bug weighting, message TF-IDF, isotonic calibration), with and without the feature. Training on the 2 years before each cutoff date, testing on the following 3 months, scoring each bug by its highest commit risk, 3 seeds each:The gain is small (about seed-to-seed noise for AUC on a single window) but it goes the same way in all three windows. Commit-level AUC is unchanged on average (−0.006 / +0.005 / −0.002, within seed variation).
No serving changes are needed: the commit classifier gets new commits through
repository.download_commits, which computesmetrics_difftoo.