Beyond the data: Shaping community partnerships through algorithms
Each year, TMU’s School of Medicine pairs learners with community organizations through its Community Advocacy Project (CAP), giving students firsthand insight into local needs and the everyday factors that affect health. But with dozens of students and partners involved, assigning the right people to the right placements can be complex.
For Ali Samani, the challenge sparked an idea.
“I heard about the project and wondered how the matches were actually going to happen,” he says. “The logistics seemed pretty complicated.”
Before entering medical school, Samani spent three years working as a full-time data scientist. Designing models, writing code and optimizing systems were part of his daily work. When he learned that placements in the CAP would be assigned manually, he suspected there could be a more systematic and transparent approach.
“I felt like there was a solution out there, exactly for this sort of problem,” he explains.
Turning curiosity into action
Samani began researching how matching processes work in other contexts, like residency placement programs. The goal was to create a fair process that took into account the preferences of the students in the program.
Samani developed a prototype algorithm and presented it to the course leadership, including Dr. Priya Chopra, Associate Director of the Community and Global Health Course and Associate Clinical Professor, who leads the CAP. Dr. Chopra and the Undergraduate Medical Education (UGME) team welcomed the collaboration and worked closely with Samani to further refine the model.
“The faculty were instrumental in giving me the information I needed,” Samani says. “ I really appreciated how open-minded they were about letting a student propose a solution.”
Defining what “fair” really means
One of the biggest challenges was deciding how fairness should be measured. Following the School of Medicine’s project fair where 24 student groups had the chance to connect with 30 community partners, learners had a chance to submit their top choices. Simply maximizing the number of students who receive their first choice might seem ideal, but it can leave others with placements far down their list.
“I wanted to be transparent, especially since I was also a participant,” he explains.
Together with Dr. Chopra and the UGME team, they selected an approach focused on minimizing the worst outcome, ensuring that no group would be assigned a placement far outside their top choices. The final model ensured most students would receive placements within their range of top choices.
Samani hopes the project encourages other students to bring their own background and skills to their training, applying ideas that extend beyond the classroom. For him, the experience reflects a key lesson from medical school so far: improving health care outcomes requires collaboration and systems thinking.
Outside of the classroom, he has been developing and piloting additional innovations he hopes to share soon and is excited to build on this expertise throughout his career.
“I look forward to continuing to apply my background in AI and data science to support medical education and the next generation of physicians at TMU,” says Samani.
"I look forward to continuing to apply my background in AI and data science to support medical education and the next generation of physicians at TMU."