opensandiego / mealscount-backend

Optimizing a free-meal reimbursement program for K-12 schools
MIT License
12 stars 15 forks source link

Validate Algorithm based upon USDA CEP spreadsheet formula #11

Closed nikolajbaer closed 5 years ago

nikolajbaer commented 5 years ago

To verify the quality of the optimizations generated by the algorithm(s) used, we want to have an implementation of the evaluation done by the "canonical" CEP spreadsheet provided by the USDA.

The idea is that we can generate the groupings for any given district, and then given that modified grouping (and the data for the district), we can process the CEP eligibility exactly as the USDA would, and compare the out come to other groupings.

Input to this should be similar to what we are generating to input into the CEP spreadsheet (as output of the algorithm)/

nikolajbaer commented 5 years ago

CEP xls file is here:

https://fns.usda.gov/sites/default/files/cn/CEPEstimatorSY2018-19.xlsx

nikolajbaer commented 5 years ago

New "validate" branch has setup an environment for this (as a command-line interface). You can run a strategy as well as a "baseline" strategy, and you will get a comparison result across the entire calpads dataset (all schools in California).

The current results are mixed, where the Algo V2 does better or worse than more naive groupings in various cases.

The additional step is going to be factoring school participation rates (the actual # of meals served) as well as the reimbursement dollar-amounts per meal to provide actual estimates of reimbursement levels (and the change).