Unfortunately values of nutrients are not based on real values.
That is because even though dataset intention (by it's creator) was to be used to classify fertilizers, it looks like instead it says what fertilizer WAS used and what will be the results of using that fertilizer on some field.
E.g: Urea has 46% of Nitrogen in it and nothing else. In dataset it was classified as best fertilizer to be used on fields with already really high Nitrogen levels. That would lead to oversaturation with Nitrogen and lack of other nutrients.
So i did some calculations and Urea now looks like this:
FertilizerType[7] = new Fertilizer
{
ID = 6,
Name = "Urea",
Nitrogen = 1.81f / 5,
Phosphorus = 21.0f / 5,
Potassium = 9.5f / 5
};
// an "inversed" and little modified counterpart of real-world version of this fertilizer.
Evaluation of the pipeline is done with cross-validation method with 10 folds.
Results are as follow:
Micro Accuracy: 0.95829
LogLoss Average: 0.100171
LogLoss Reduction: 0.933795
Model is created and saved for later use, to skip long trainig and evaluation times.
Later that model is loaded and prediction engine is created when program is started.
## Integration Details
Agent (tractor) navigates trough the grid looking for tiles where it can plant some plants.
Upon planting and visitin already growing plants agent decides if any fertilizer is needed (rule based decision), and what fertilizer to use (using ML prediction engine).
If field is properly fertilized it will have higher production rate, resulting in faster growth of a plant.
Production rate value is shown in the UI as well as it is represented by the colour of progression bar (right side of every tile).
At 100% bar will pure **Green**. Any value below will make bar more **Red**, while any value above will add **Blue**, eventually turning bar colour into cyan.