A Zambian graduate student in the United States is developing a machine learning system designed to help African farmers decide what to plant, when to plant it and how much yield to expect — addressing a growing challenge as climate change disrupts the generational knowledge that has long guided African agriculture.
Mwansa Phiri, a student in the Katz School’s master’s program in artificial intelligence, is leading a project called Smart Farming: A Machine Learning Approach to Crop Growth Prediction. The project aims to support food security across Africa by giving farmers better data on which to base planting decisions, particularly as drought, flooding and tightening regulations on water and fertilizer use put traditional farming methods under strain.
Phiri said the project was inspired in part by Zambian agritech entrepreneur Nchimunya Munyama, whose own AI-focused startup grew out of the challenges his grandfather faced as a farmer. “Since we’re in the United States, we don’t really get to hear what’s going on back home,” Phiri said. “Nchimunya came to visit us in the States and told us how difficult it is for farmers to know what to grow. They rely on generational knowledge — what their parents always planted — but climate conditions are changing.”
Phiri collaborated with fellow AI students Jelidah Nayingwa and Esparance Tuyishime, who helped train, test and refine the machine learning models. “We approached it as a team,” he said. “Jelidah, Esperance and I used this project to help figure out how to finalize the model in a way that would actually work in real farming conditions.”
The system combines small, affordable Internet of Things devices with machine learning models. The IoT devices, equipped with sensors measuring soil moisture, temperature and humidity, are placed in fields and transmit data via a Wi-Fi module to a cloud-based platform for analysis. The machine learning models then predict three key outcomes: which crops are best suited to a field, when to plant them and how much yield to expect.
“It helps them with utilization,” Phiri said, referring to new restrictions on fertilizer use in some African countries. “Farmers weren’t given training on exact amounts. They just had a standard practice — throw everything on the ground and hope it grows. With the system, you can monitor how much fertilizer or water is actually needed and track what worked well before. That way, you don’t waste resources.”
The team trained the system using multiple agricultural datasets containing information on soil pH, rainfall, irrigation, fertilizer use and crop types. One major challenge was regional variation across the data. “When some datasets wrote ‘maize,’ I assumed it was the standard maize we have back home,” Phiri said. “But there are different variations. Some data came from Kenya, and the crops performed differently than we expected.” The team standardized the data — sometimes treating similar crops as entirely separate plants — and engineered new features such as rainfall per day rather than total rainfall, to better capture how weather affects growth.
The project addresses two prediction types: classification, which determines whether a crop is suitable for a particular field, and regression, which estimates yield. After testing several models including Random Forest, Support Vector Machines and Neural Networks, Random Forest performed best for crop suitability. When Phiri tried using fewer data features, accuracy dropped sharply. “It just showed that we needed more data,” he said. “If you try to do it with less data, you might give results that people wouldn’t be happy with. We wanted to avoid telling farmers a crop would work and then having it fail.”
Accessibility is central to the project’s mission. While the system includes a mobile app with dashboards and predictive charts, the team also built a text-based feature for farmers using basic phones. “The IoT device can send a summary by text message,” Phiri said. “That way, farmers don’t need smartphones or training on complicated interfaces.”
Looking ahead, Phiri hopes to integrate satellite imagery and drone data to monitor plant health using vegetation indexes — a development that would require more advanced deep learning models. “We would redesign a new model at a larger scale,” he said.
For Honggang Wang, chair of the Graduate Department of Computer Science and Engineering at the Katz School, the research illustrates how AI can address urgent global challenges. “This project shows the power of artificial intelligence when applied to real-world problems,” Wang said. “By combining IoT sensing, data analytics and machine learning, Mwansa’s work has the potential to make agriculture more resilient, sustainable and profitable, especially in regions where food security is fragile.”
Early results are promising, with improved yield prediction accuracy and better resource optimization. But moving from research to real-world deployment will require pilot programs, investor backing and policy support. For Phiri, the motivation remains personal. “Agriculture production is essential for food security,” he said. “If we can give farmers better tools to make decisions, we can help make farming smarter and help ensure there’s enough food for everyone.”





