forked from haskelladdict/nutmeg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to compare against reference counts with deviations
This commit extends the ability of the COMPARE_COUNTS test facility. This addresses issue #1 on the tracker. Previously, COMPARE_COUNTS would check for an exact match of counts compared to the values in a reference file in a column by column fashion. This commit adds the ability to compare test data against reference data allowing for a certain tolerance specified via "absDeviation" = [A1, A2, A3, ...] or "relDeviation" = [R1, R2, R3, ....] Only one of absDeviation or relDeviation can be specified per check. Here the Ai are integers specifying the allowed absolute deviation of column i with respect to the reference data set. Similarly, the Ri are floats specifying the relative deviation with regard to the reference data set. E.g. if the reference data set looks like 1e-6 100 50 2e-6 110 55 3e-6 120 60 ... and "absDeviation" = [10, 5] Then the following observed output would pass the test 1e-6 108 53 2e-6 112 56 3e-6 118 58 Whereas the following observed output would fail in row 2 1e-6 108 53 2e-6 113 61 3e-6 124 64 since 61 is outside 55 +/- 5. Similarly for "relDeviation" = [0.1, 0.1] the first test above would pass while the second would not since 61 is outside 55 +/- (55 * 0.1) = 55 +/- 5.5.
- Loading branch information
1 parent
83648d1
commit cc11ee1
Showing
3 changed files
with
50 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters