Engine to support custom aggregation pipeline. It
updates statistics about each venue (number of sick
tweets associated with that venue, etc.).
The health professionals interact with nEmesis
through a web application shown in figure 1. All
modules described above work together to produce a
unified view that lists most likely offending venues
along with supporting evidence. This allows inspectors to make informed decisions how to allocate their
resources. The application was written using a combination of Python for the data access layer and
AngularJS for the front-end.
Developing the SVM model took 3 engineer-months. The backend modules above (Downloader
through Labeler) took 2 engineer-months, and the
Web Interface took an additional engineer-month.
Results and Discussion
Figure 6 is a histogram of the inspection results. There
are clearly more control restaurants (red) that passed
inspection with flying colors — zero or one demerit.
The adaptive inspections (blue) appear to cluster
toward the right — more demerits — but a careful sta-
tistical analysis is necessary to determine if this is real-
ly the case. We use paired Mann-Whitney-Wilcoxon
tests to calculate the probability that the distribution
of demerits for adaptive inspection is stochastically
greater than the control distribution (Mann and Whit-
ney 1947). This test can be used even if the shapes of
the distributions are nonnormal and different, which
is the case here. The test shows that adaptive inspec-
tions uncover significantly more demerits: nine versus
six per inspection (p-value of 0.019).
Note that the result would have been even stronger
if not for an outlier in the control group, a single control restaurant that received a score of 62 for egregious violations. Even including this outlier, however, we have very strong statistical evidence that
adaptive inspections are effective.
Chi-squared test at the level of discrete letter grades
(as noted earlier, 0– 10 is an A, 11–20 is a B, 21–39 is
a C, and 40+ is an F), also show a significant skew
Figure 6. Histogram of the Inspection Results.
The adaptive inspections are blue (light gray), and the control inspections are red (dark gray). The horizontal axis is the number of demerits where the bucket size is 2, and the vertical axis is the number of venues.
2 4 6 8 12 14 16 18 20 22 24 26 28 30 32
34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 10