top of page
Search

Keanu Has Some Explaining to Do


I recently watched The Matrix and I’m kind of obsessed with the last scene where Keanu Reeves steps out and puts on his oval, rimless black sunglasses and the camera zooms out onto the cityscape of the Matrix. I definitely understood Keanu's confusion in the Matrix (I mean it kind of destroyed his entire reality) and think he could have benefited with one of these above, which is what I'll be discussing today. A Confusion Matrix! It’s been a while since I’ve written about my research project training a Random Forest classifier model on a synthetic dataset of India–US traveler records. I decided to check back in given that my paper is almost finished and talk about some of our final results. I’ll paste the title and abstract of my paper in the next blog post.

I chose to demonstrate a portion of my results visually to make the paper more readable. This is where the above matrix comes in. The synthetic dataset sorted each traveler into one of ten categories — COVID-19, Dengue, Tuberculosis, Hepatitis B, and so on, or "None" if they weren't sick at all. As you may recall, I split my data in training data and testing data. This meant that for some of the data, the model was given the disease that each traveler had. However, for the rest of the data, the model wasn’t given this data and had to assign a disease to each traveler based on patterns it drew from the other variables (symptoms, destination city, etc.) Simply put, this matrix tells us: how often did the model correctly guess the disease and if it didn’t, what did it guess instead? Every row is the true disease a traveler actually had; every column is what the model guessed. If this model was perfect, all numbers above zero would only be on the diagonal from the top left to the bottom right, where the diseases match. I mean, give me some credit, because a line of best fit would fall on that line, but unfortunately this isn’t 8th grade math class.  

Let’s start with the good news. Turns out, COVID-19 was easy: all six test cases were correctly identified. Tuberculosis: same deal. "None," the healthy-traveler category: all nine correctly called healthy. For these three diseases, the model saw a case, recognized a clear pattern, and moved on with confidence.

Now comes the part where some numbers slip off the clean diagonal. Of five true Dengue cases, only two got labeled Dengue — the other three got called Chikungunya instead. And Hepatitis B, while four out of six were correctly identified, two cases were mistaken for Typhoid. Separately, Influenza cases got confused for Hepatitis B. None of this is the model being careless. It was being asked to draw a hard line between diseases that, in the underlying synthetic symptom data, don't actually look all that different from each other — Dengue and Chikungunya are both mosquito-borne, both cause fever and joint pain; Influenza and Hepatitis B can both show up as fatigue before anything more specific kicks in. If two diseases hand the model nearly identical clues, you can't really blame it for occasionally picking the wrong one. I believe that there’s another culprit here as well: sample size. By looking at the numbers, you yourself can see that each disease category only had a handful of test cases. In this way, one misclassified traveler swings the accuracy a lot. The model’s test set per case was not ideal, and this carried over to the results. So no, my Random Forest model hasn't fully unplugged from the Matrix (sorry, I’ll stop) — it still gets tripped up by diseases that are like two people from the back wearing the same trench coat. However, my point with this post wasn’t to tell you that my model needs to be drastically changed and that I’ve failed with this project. Of course, it could use cleaner symptom-disease mappings and more cases per disease class, but this matrix draws attention to real-world health scenarios. 

This happens to real patients, all the time, especially those in developing countries who are getting diagnosed preemptively and being administered antibiotics due to a lack of proper lab testing. I recently read a 2014 study out of a rural health center in Ethiopia that uses the Widal test, which is often used for diagnosing typhoid. However, it cross-reacted with malaria antibodies so often that it led to a lot of people getting told they have typhoid when they actually have malaria (or vice versa), and getting handed a wrong course of antibiotics for a disease they don't have. A more recent 2025 Nigerian study highlighted the importance of stronger diagnostic tools. Dengue was consistently getting mistaken for malaria and typhoid because the three diseases can look almost identical symptomatically: fever, headache, joint pain, nausea. Looking at my confusion matrix in this light makes it stop feeling like a coding issue. My model confused Dengue for Chikungunya and Influenza for Hepatitis B for the same reason a human clinician might. Similarly, a patient’s symptoms might parallel those of a bacterial infection such as Typhoid but are actually just a viral infection, which antibiotics are useless on. The stakes for my model are a lower accuracy score. The stakes for an actual febrile patient in a clinic with no rapid diagnostic on hand are a wrong prescription, a delayed real diagnosis, and one more contribution to the growing issue of antimicrobial resistance.


Recent Posts

See All
Past the Lab

IN PROGRESS At VHS, I had the opportunity to speak to the Chief Medical Officer of Infectious Diseases, Dr. Kumaraswamy, on his experience developing and promoting HIV Antiretroviral therapy in India

 
 
 

Comments


bottom of page