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

Update algorithm values #125

Open
jedahan opened this issue Nov 1, 2019 · 0 comments
Open

Update algorithm values #125

jedahan opened this issue Nov 1, 2019 · 0 comments

Comments

@jedahan
Copy link
Contributor

jedahan commented Nov 1, 2019

Right now, the predicted-npm package's algorithm is off.
Wade has provided updated constants that should fix things, but we should really write some better test cases that compare their matlab results with ours. It is okay if the exact numbers don't line up 100%, but the start and decay times should line up, and at any given hour, they should be within 5% of each other.

Hi Guys -

There is something going on here and I don't know what it is. Your display works awesome. I am impressed how you successfully pull the three data sources and how stable it is. The algorithm relaxation seems off to me. Time Since Rain (TSR) seems to start since midnight and your calculation says the CFU is now about 38 MPN. If the variable TSR (hours) goes into the code MPN = 292 * TSR ^ -.6 then using 12 hours for TSR, the MPN (or CFU) should now be 292 * (12)^-.6 = 65 CFU

Could the four of us fix this because everything is working mechanically but the Reaktor code isn't matching the S&W code (I think).

This is not great since it is giving a false negative (I think).

Wade and Shawnee

%MPN algorithm with CP data (every 15 min)
r_rec=length(rain);
rain_alg = zeros(1,r_rec);
count_tsr=rain_alg;
time_alg=rain_alg;

for i = 33:r_rec
    rain_alg(i)=sum(rain(i-32:i));

    if rain_alg(i) > .25
         count_tsr(i) = 1;
    else
         count_tsr(i)=1+count_tsr(i-1);
    end
    timer(i)=i*.25;
    time_alg(i)=count_tsr(i)*.25;
end

bacteria_MPN = 292.3*time_alg.^-.61;

%current value
bacteria_MPN(end)
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

1 participant