imanr is model that provides researchers with a powerful tool for the classification and study of native corn by aiding in the identification of racial complexes which are fundamental to Mexico’s agriculture and culture.
# As of today, you can install the development version from GitHub:
# install.packages("devtools")
devtools::install_github("rafa6174/imanr")
The package is composed of two functions: find_racial_complex()
and
impute_data()
.
impute_data()
is used to preprocess the data by imputing the missing
information by comparing the absent fields with the full information
from the “Proyecto Nacional de Maíz Nativo” database and then filling
the gaps with adequate data that is computed through a random forests
approach. find_racial_complex()
is loaded with the machine learning
model that computes the classification for the corn sample that is being
fed to the function. The function takes only one argument which is a
dataframe including qualitative and quantitative characteristics of the
native corn.
# test for racial complexes
find_racial_complex(data31)
#> [1] Tropicales tardíos Dentados tropicales Dentados tropicales Dentados tropicales
#> [5] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [9] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [13] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [17] Dentados tropicales Dentados tropicales Tropicales tardíos Dentados tropicales
#> [21] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [25] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [29] Dentados tropicales Dentados tropicales Dentados tropicales
#> 7 Levels: Chapalote Cónico Dentados tropicales Ocho hileras ... Tropicales tardíos
- Required: missForest, caret, ranger, dplyr, parallel, doParallel, foreach