Published March 17, 2024
| Version 1
Model
Open
Code of machine learning to predict first lactation milk yield using a dataset of management and growth curve derivatives
Description
This code was developed in R software using mainly H2O.AI package and the function AutoML. Sample codes for each of the six scenarios using all selected variables from the dataset or only some of them. In each model X represents months ranging from 3 to 21, depending on the month used for modeling.
Model name | Variables used as predictors |
Fourier_all_vars.R | stacion, Edad_IA, wt_X, X1STd_X and X2STd_X |
Fourier_no_derivadas.R | Edad_IA and wt_X |
Fourier_no_IA_no_wt.R | Estacion, wt_X, X1STd_X and X2STd_X |
Fourier_no_season.R | Edad_IA, wt_X, X1STd_X and X2STd_X |
Fourier_solo_1d.R | Estacion, Edad_IA, wt_X, and X1STd_X |
Fourier_solo_2d.R | Estacion, Edad_IA, wt_X and X2STd_X |
The user needs to select the train and test data sets from seven available splits. The index "ii" is used to select appropriate variables corresponding to the months of the heifer's rearing period. The user needs to change the value of index ii.
Manual control was necessary because the AutoML system would occasionally produce runtime errors. Running the code again was the solution.
Files
Codes.zip
Files
(7.5 kB)
Name | Size | Download all |
---|---|---|
md5:cb92e6ceec4142b7c255199bea96734a
|
7.5 kB | Preview Download |
Additional details
Related works
- Requires
- Dataset: https://zenodo.org/doi/10.5281/zenodo.10827559 (Crossref Funder ID)