Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BMI is incorrect #502

Open
canasdiaz opened this issue Dec 14, 2022 · 9 comments
Open

BMI is incorrect #502

canasdiaz opened this issue Dec 14, 2022 · 9 comments

Comments

@canasdiaz
Copy link
Contributor

canasdiaz commented Dec 14, 2022

The current calculation we do to offer the BMI is wrong according to this paper (see page 8 of the pdf)

In the current calculation we are not multiplying by 100. This new value will help us to explain the result, as it shows the percentage of tickets you are being able to digest per week. So it is more easy to be explain that if BMI is 90%, it means that you are being able to close 90% of the tickets and a 10% goes to the backlog.

The current calculation of the Timeline/Timelion chart is below:

.es(index=github_issues, q='pull_request:false', timefield=closed_at).divide(.es(index=github_issues, q='pull_request:false', timefield=grimoire_creation_date)).label('BMI').color(#99af5d),
.es(index=github_issues, q='pull_request:false', timefield=closed_at).divide(.es(index=github_issues, q='pull_request:false', timefield=grimoire_creation_date)).movingaverage(8w, 'left').label('BMI Moving Avg. (8 weeks)').color(#c83d32),
.es(index=github_issues, q='pull_request:false', timefield=closed_at).divide(.es(index=github_issues, q='pull_request:false', timefield=grimoire_creation_date)).trend().label('BMI trend'),
.es(index=github_issues, q='pull_request:false', timefield=closed_at).divide(.es(index=github_issues, q='pull_request:false', timefield=grimoire_creation_date)).aggregate(avg).label('Avg. BMI').color(#e6b740)
@canasdiaz canasdiaz added the bug label Dec 14, 2022
@sduenas
Copy link
Member

sduenas commented Dec 14, 2022

Is it really a bug or is just a problem about how users can understand this metric better?

@canasdiaz
Copy link
Contributor Author

If you look for papers or even web sites where the Backlog Management Index is explained, the standard definition is: ´(closed issues / opened issues) * 100`. This is not what we have in the GrimoireLab metrics

@alpgarcia
Copy link
Contributor

Percentage means divided by 100. Percentage sign "%" then means divided by 100. Thus, 100% = 100 / 100 = 0,1.

It's not a bug, just two ways of expressing the same. If they multiply by 100 for any other reason, then it's a matter of scale.

@GeorgLink
Copy link
Member

This means that when we close issues but don't open new issues, our BMI should be infinite!!! (breaking the chart :-D )

@canasdiaz
Copy link
Contributor Author

Two questions for you:

  • where is the BMI defined as closed/open without being multiplied by 100? If you think it should be closed/open then we need to publish this specification somewhere: blog post, research paper, whatever ..
  • don't you think it is more easy to be understood, that if you get 100% you are closing the same amount of tickets you are getting?

@alpgarcia
Copy link
Contributor

  • where is the BMI defined as closed/open without being multiplied by 100? If you think it should be closed/open then we need to publish this specification somewhere: blog post, research paper, whatever ..

As I said, 100% = 1. It's not any specification, it's math. If you specify to multiply by 100 and then you say the result is 100%, then you are saying the result is 100/100 = 1.

  • don't you think it is more easy to be understood, that if you get 100% you are closing the same amount of tickets you are getting?

This is a different question and I'm not against it, I'm against to consider this a bug because it complies with the metric definition.

@canasdiaz
Copy link
Contributor Author

I've found the place where the BMI was defined in 2002. The book is "Metrics and Models in Software Quality Engineering, 2nd Edition" By Stephen H. Kan

Find below the definition:
imagen

More info at https://www.informit.com/articles/article.aspx?p=30306&seqNum=3

@canasdiaz
Copy link
Contributor Author

As @fioddor pointed out, the definition of the metric is not coherent. For one side, the factor is multiplied by a percentage. It does not make sense. Second, the author mentions the value without the percentage but multiplied by 100.

As a minimal consensus, I believe we can agree that the BMI must be displayed in percentage. Do you agree?

@alpgarcia
Copy link
Contributor

Yes, I agree. Please, remove the bug label and add enhancement instead for clarity. One might think the metric is not displaying the right value when that's not the case, is just a matter of mathematical terminology.

@canasdiaz canasdiaz added enhancement and removed bug labels Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants