-
Notifications
You must be signed in to change notification settings - Fork 31
Subtract mu (-0.3) from number of days as stated in equation 3 #6
Comments
The distribution mean |
ah yes, - - 0.3, updated issue |
Apologies now I may not be understanding correctly..... but I think what we want is a mix of the original and the updated title 😝 . I realise there's a double negative thing going on but if you're looking at the equation and expecting the code to match I'd expect to see a minus in code not an addition. So I think we should add
And then update the calculation like so:
I'm pretty sure the underlying language will understand the double negative and at least this way comparing equation 3 and the code is slightly more straight forward. Apologies if this is off on the wrong direction. Either way, looks like IOS is using the same calculation. |
Ah yeah you're right lol, no worries. Will update again. Yeah the new constant should be added, but also the "daysFromOnset: Int" should be a decimal/float data type or casted before hand to work with decimal numbers. Have had a look through other parts and seems everything is in whole number of days with a max of 7, seems odd. |
@mezpahlan introducing another constant is almost certainly the sane way to go about this, I was more just concerned with the fact that a constant wasn't being introduced and the calculation was being made less accurate as a result |
any updates? |
https://github.com/nhsx/covid-19-app-android-ag-public/blob/01f790a0ebefe20ba6ff7925e56dfd88911741bf/app/src/main/java/uk/nhs/nhsx/covid19/android/app/exposure/encounter/InfectiousnessFactorCalculator.kt#L12-L17
Changes to this function needed for results to be inline with the equation.
val step1 = (daysFromOnset + 0.3) / sigma
The text was updated successfully, but these errors were encountered: