Zambian students build machine learning system to help African farmers adapt to climate change

Machine Learning


A Zambian graduate student living in the United States is developing a machine learning system designed to help African farmers decide what to plant, when to plant it, and what yield to expect. This is to address growing challenges as climate change disrupts the intergenerational knowledge that has long guided Africa’s agriculture.

Mwansa Phiri, an artificial intelligence master’s student at the Katz School, 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 providing farmers with better data on which to base planting decisions, especially as traditional farming methods are under pressure due to drought, flooding, and increased regulations on water and fertilizer use.

Pili said the project was partially inspired by Zambian agritech entrepreneur Nchimunya Munyama. He says his AI-focused startup grew out of the challenges his grandfather faced as a farmer. “Because we’re in the United States, we don’t get to hear much about what’s going on back home,” Phiri said. “Chinmunya came to visit us in America and told us how difficult it is for farmers to know what to grow. They rely on generational knowledge, what their parents have always planted, but climate conditions are changing.”

Phili worked with fellow AI students Jelidah Nayingwa and Esparance Tuyishime to help train, test, and refine machine learning models. “We worked on it as a team,” he said. “Jelida, Esperance and I used this project to find ways to perfect 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. IoT devices with sensors that measure soil moisture, temperature, and humidity are installed in fields and send data via Wi-Fi modules to a cloud-based platform for analysis. The machine learning model then predicts three important outcomes: which crops are best suited for the field, when to plant them, and how much yield they can expect.

“This will help their use,” Phiri said, referring to new restrictions on fertilizer use in some African countries. “Farmers weren’t trained on exact amounts. They just had the standard practice of throwing everything on the ground and hoping it would grow. With this system, you can monitor how much fertilizer and water you actually need and keep track of what was working well before. That way you don’t waste resources.”

The team trained the system using multiple agricultural datasets, including information on soil pH, rainfall, irrigation, fertilizer use, and crop type. One of the major challenges was the regional variation across the data. “When I saw ‘corn’ written in some datasets, I thought it was the standard corn we have at home,” Phiri said. “But there’s a lot of variation. Some of the data came from Kenya, and the crops performed differently than we expected.” The team standardized the data, sometimes treating similar crops as completely different plants, and designed new features, such as daily rainfall rather than total rainfall, to better understand how weather affects growth.

The project addresses two types of prediction: classification, which determines whether a crop is suitable for a particular field, and regression, which estimates yield. We tested several models, including random forests, support vector machines, and neural networks, and found that random forests performed best when it came to crop suitability. When I tried reducing the number of data features that Phili used, the accuracy dropped rapidly. “We realized we needed more data,” he said. “If you try to do it with less data, you might get results that people aren’t happy with. We wanted to avoid telling farmers their crops would work and then failing.”

Accessibility is central to the project’s mission. The system includes a mobile app with a dashboard and forecast graphs, but the team also built text-based functionality for farmers using basic phones. “IoT devices can send summaries via text message,” Phiri says. “Then farmers don’t need smartphones or complex interface training.”

Looking to the future, Phiri wants to integrate satellite imagery and drone data to monitor plant health using a vegetation index. This will require more advanced deep learning models. “We’re going to redesign the new model on a much larger scale,” he said.

For Hongan Wang, dean of the Katz School’s Graduate School of Computer Science and Engineering, this research shows 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 areas with vulnerable food security.”

Initial results are promising, with improved accuracy in yield prediction and improved resource optimization. But moving from research to real-world deployment requires pilot programs, investor support, and policy support. For Fili, the motivation remains personal. “Agricultural production is essential for food security,” he said. “If we can give farmers better tools for decision-making, we can make agriculture smarter and ensure there is enough food for everyone.”



Source link