Hyperspectral imaging predicts yield and nitrogen content in grass-legume polyculturesem
predict_nutrient.py demonstrates PLSR modelling using Bootstrap validation and it was tested in Python 3.6.
The folder "organised_data" includes all of the pre-processed data, including reflectance data and laboratory-measured data.
The program conducts the following parts:
1. Trains a PLSR model using the original data and then validates the model using the original data. The validation results will be
saved in a .xlsx file with column names of 'xxx_full'.
2. Trains a PLSR model using the Bootstrap data (re-sampling with replacement) and then validates the model using the original data. The validation results will be
saved in the .xlsx file with column names of 'xxx_bs.
3. Trains a PLSR model using the Bootstrap data and then validates the model using the Bootstrap data. The validation results will be saved
in the .xlsx file with column names 'xxx_a'.