Reviewing Code- The Naive Bayes Way

1,082 views

Published on

If you have nothing better to do and feel like hearing 2 programmers go on about mining intelligence from code metrics, watch this. Mark Needham and I spent some time after work learning some training algorithms and building a tool that will help a software company identify programmers that they wish to recruit :)

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,082
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Reviewing Code- The Naive Bayes Way

  1. 1. The Naïve Bayes approach to code reviews Mark Needham (Markeshwa) Ashwin Raghav (Ashley)
  2. 3. Why don’t we use code metrics to do code reviews?
  3. 4. Why don’t we use code metrics to do code reviews? We need a human to do it - quality of code isn’t only about code metrics, it’s a subjective thing
  4. 5. Why don’t we use code metrics to do code reviews? We need a human to do it - quality of code isn’t only about code metrics, it’s a subjective thing But what if we based it on the outcome of code reviews that have already been done? It’d be more consistent and less effort!
  5. 6. Why don’t we use code metrics to do code reviews? We need a human to do it - quality of code isn’t only about code metrics, it’s a subjective thing But what if we based it on the outcome of code reviews that have already been done? It’d be more consistent and less effort! Let’s do it!
  6. 7. SIQ Initiative “ We think that we can help people better understand the internal quality of software. We plan to do this by employing visualisation techniques for metrics and other characteristics of software. Our approach is reflective and we want to evolve our visualisations towards a commonly useful set.”
  7. 8. Erik Doernenburg
  8. 9. Notes C API Erik’s shell script Metrics + code Mercurial Repository Java NCSS Code Reviews
  9. 10. Metrics + code Some sort of algorithm Would a code review be passed/pursued?
  10. 11. Naïve Bayes Classifier “ A simple probabilistic classifier based on applying Bayes' theorem (from Bayesian statistics) with strong (naive) independence assumptions. In simple terms, a naive Bayes classifier assumes that the presence (or absence) of a particular feature of a class is unrelated to the presence (or absence) of any other feature.”
  11. 12. Metrics + class Bayes Algorithm Training
  12. 13. Metrics + class Bayes Algorithm Training Metrics Bayes Algorithm Predicting Class

×