cnumr / EcoIndex

Dépôt du site www.ecoindex.fr
http://www.ecoindex.fr
Other
65 stars 13 forks source link

[Bug]: formula differ from website? #314

Closed emidevops closed 3 months ago

emidevops commented 6 months ago

What happened?

round(100 - 5 (3 q_dom + 2 * q_req + q_size) / 6)`

image

Version

^3.6

What OS do you use?

Linux

Relevant log output

No response

Code of Conduct

vvatelot commented 6 months ago

🙏🏻 Praise: Thank you for your contribution @emidevops

I think that the documentation is not up to date because all the projects of Cnumr are using this formula from what I know:

round(100 - 5 * (3 * q_dom + 2 * q_req + q_size) / 6)

https://github.com/cnumr/GreenIT-Analysis/blob/ca1d15baa5cc0ee02a13a2a49b332704de0cb476/script/ecoIndex.js#L34

https://github.com/cnumr/GreenIT-Analysis-cli/blob/9c1f010ad939782fab6fa1033d0ac267da547760/greenit-core/ecoIndex.js#L35

https://github.com/cnumr/ecoindex_js/blob/3b58a54abff149da7944e707132eec8242e00227/src/index.js#L35

@bordage can you confirm?

tbroyer commented 6 months ago

Doesn't that directly depend on how the q-values are computed? In the above links, if the computeQuantile functions multiplied their result by 5 then the final formula would be the same as the one on the website. (and that 5 factor is due to the fact that computeQuantile currently returns a value between 0 and 20, not between 0 and 100)

bordage commented 6 months ago

@tbroyer : you are right. That's the good answer.

github-actions[bot] commented 4 months ago

Cette issue a été marquée comme inactive car elle n'a pas eu de mise à jour depuis 30 jours. Si elle n'est pas mise à jour d'ici 7 jours, elle sera fermée automatiquement. Pour éviter qu'elle soit fermée, vous pouvez ajouter le label keep open.

github-actions[bot] commented 3 months ago

Cette issue a été fermée car elle est inactive depuis 37 jours. Si vous pensez que c'est une erreur, vous pouvez la rouvrir.