dssg / tyra

Prediction model evaluation
Other
4 stars 1 forks source link

Precision and Recall Curve by Threshold #25

Closed tweddielin closed 7 years ago

tweddielin commented 7 years ago
thcrock commented 7 years ago

Merge conflict

codecov-io commented 7 years ago

Current coverage is 73.57% (diff: 87.50%)

Merging #25 into master will increase coverage by 2.88%

@@             master        #25   diff @@
==========================================
  Files             4          4          
  Lines           116        140    +24   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits             82        103    +21   
- Misses           34         37     +3   
  Partials          0          0          

Powered by Codecov. Last update 69c131c...b78f28c

thcrock commented 7 years ago

Codecov is right; since we're adding new backend code here, we should put in a test for the API call.

Check out this example, I added some utils to remove boilerplate for setting up API tests, so each endpoint test looks something like this: https://github.com/dssg/tyra/blob/master/tests/test_evaluations_modelprediction.py

You basically just add a json file to the proper path (sample_json/evaluations/1/metric.json in this case) representing expected API output, and then add the database data in the test that you expect to produce that JSON.

tweddielin commented 7 years ago

Should we open another issue specifically for the API tests?

thcrock commented 7 years ago

Looks like Codecov is too shy to comment on the same PR twice, but coverage is up to 74% from the 70% in master, so that's awesome. Merging.