Logo Lanfrica

PhilipJanz/Master-Thesis-Project

Domain:

agriculture

Record type:

project
Creator:
Phi
Host:
Using machine learning for maize yield prediction in East-Africa. Exploring the possibilities of transfer learning to enable stable results in data-scarse domains. # Modeling Maize Yield in Sub-Saharan Africa Using Machine Learning: Overcoming Data Scarcity with Transfer Learning This project units all methods needed to apply maize yield modeling, using various models. It was developed to predict maize yields for Tanzania, Malawi and Zambia. The structure allows to add other countries as well. In this case the following steps should guide the user to accomplish this goal. The order of those steps is generally important since the processing steps are dependent on each other. All scripts are written in python and use a specific set of packages. The requirements can be found in requirements_cpu.txt and requirements_gpu.txt Those files correspond to two different python environments that are necessary for CPU and GPU tasks. Note that the GPU environment is exclusively for tensorflow deep learning (transfer_learning_source_model_cnn.py). While, all other scripts should be executed using the cpu environment. It is recommended to use a conda environment to construct the python environments. Run conda in the terminal to create a ready-to-use environment: conda create --name cpu_env_name --file requirements_cpu.txt The GPU environment is a bit more tricky, because it requires a lot of different installations that vary depending on the operating system. Therefore, the user is guided to tensorflow.org for a detailed instruction to install tensorflow using CPU or GPU. After successfully installing tensorflow run this to install all other packages required: pip install -r requirements_gpu.txt ## 1. Data Collection ### Yield Data Download and save yield data into the folder data/raw_source/yield. This code was designed especially for Tanzania, Malawi & Zambia. Be free to add new data from different countries or crops. When you do that, take a look at the config.py file that organizes global variables, like area of interest. Those variables are crucial because they are uses by all different kinds of scripts thro …