Methodology for Numerical Assignment of Categorical Variables Based on Relative Importance and Genetic Algorithms
摘要
This research proposes a methodology for transforming categorical variables into numerical values using genetic algorithms, optimizing the assignment based on the relative importance of each category with respect to a target variable. Unlike conventional techniques such as One-Hot Encoding or Mean Encoding, this evolutionary approach generates adaptive numerical assignments by applying genetic operators such as mutation, crossover, and natural selection. The performance of the proposed method is evaluated on a classification dataset, demonstrating improvements in both interpretability and predictive efficiency by avoiding overfitting and reducing the dimensionality of the problem. It is worth emphasizing that the way categorical variables are represented has a direct impact on the quality of the predictive model; an appropriate encoding can make the difference between an efficient model and one that is unstable or biased.