Closed bolom closed 1 year ago
Hi @bolom, besides the small comments I've left in the code, one thing to fix is that the new fields make the page structure of the PDF report to brake:
The fields should be organized into columns, please take as a reference the PDF for the boxes of purpose = Challenge, where more fields are informed and the confusion matrix fits completely into the first page:
et voila
@leandroradusky helped me last week to validate the calculations using some data. We could use the same data to create the test for calculating LOD and LOB.
concentrations [0, 10, 10, 10, 20, 0]
signal [10, 100.12, 193.5, 100.12, 193.5, 3.3]
Blank Sample size : 2
Limit of Detection: 17.651812199460668
Root Mean Square Error: 34.65889649273338
Limit of Blank: 14.443377388847534
Gray Zone: 14.443377388847534..17.651812199460668
These numbers are ok to make a test :+1: (to test the function you will have to round them to three decimal places since we're returning the rounded number).
Still think thatrmse
& gray zone
should be removed from the function and calculate_lod
& calculate_lod_and_lob
should be merged into one function or at least renamed properly to reflect what they do before merging this PR.
I continued the testing, is almost ready to merge. I've detected two things:
measured_signal
and these samples will be ignored, as pointed out in the report creation screen:When this happens, and we try to create a report, the following error is thrown:
nil values should be ignored in the mapping to float.
@leandroradusky I've fixed the method and the indentation
This PR include caculation of Limit of Detection and Limit of blank. I've used the gem rumale