# Strategies of Automated Machine Learning for Energy Sustainability in Green Artificial Intelligence
## 5 Materials and Methods
### Experiment  
The experimentation was conducted following the proposed methodology, as well as some enhancements from the one presented in [77]. The EfficientNet architecture was used in conjunction with the CIFAR-10 dataset, which is discussed in previous sections. The dataset was divided with an 80-20% split designated for training and the remaining portion for testing. Two main experiments were conducted, named the Red AI and the Green AI experiment. In these experiments, the dataset was evaluated with the implementation of a proof of concept. The hyperparameter optimization algorithms presented in Section 2.1 were utilized. The optimization of the hyperparameters was carried out for four hyperparameters: epochs, learning rate, batch size, and optimizer. However, the search space of the algorithms was deliberately kept conservative, and default and equal parameters were employed for each algorithm to mitigate any potential expert bias in the results. All algorithms were configured with the basic features that differentiate them. The search procedure comprised optimization techniques and hyperparameter tuning, backed by specific algorithms. In the HyperBand algorithm, random search is accelerated through adaptive resource allocation and early stopping. In BOHB, Bayesian optimization is merged with the HyperBand to fine-tune the hyperparameters, selecting promising candidates through kernel density estimators. In the case of PBT, it improves the efficiency of machine learning model training by dynamically adjusting their hyperparametersand maintaining a population of models with different hyperparameter configurations. The ASHA adapts the successive halving algorithm to the asynchronous parallel scenario, promoting configurations to the next rung level as soon as enough observations are collected. The search and optimization process was not intensive in the pursuit of the optimum, adhering to certain sustainability guidelines. In the Red AI experiment with CIFAR-10, HPO is performed to maximize the accuracy metric. Conversely, in the Green AI experiment with CIFAR-10, the focus is on minimizing energy consumption. In both experiments, the carbon footprint is determined to assess the environmental impact of each strategy. In the BiLSTM architecture, the IMDb dataset was utilized, which was discussed in previous sections. The dataset was divided with an 80-20% split designated for training and the remaining portion for validation. Two main experiments were conducted, named the Red AI with IMDb experiment and the Green AI IMDb experiment. The BOHB and PBT hyperparameter optimization algorithms, presented in Section 2.1, were utilized. The BOHB algorithm, which combines Bayesian optimization with the HyperBand, allows for an effective hyperparameter search and efficient allocation of computational resources. It adapts to the effectiveness of observed configurations, reducing the number of model evaluations required and potentially decreasing energy consumption. The PBT algorithm, population-based, allows multiple models to compete and collaborate to improve their hyperparameters. This facilitates efficient exploration of the hyperparameter space and adaptive search. However, maintaining multiple models and coordinating their interaction may require additional resources, potentially increasing energy consumption. Hyperparameter optimization was carried out considering the maximum vocabulary size, the maximum length of input sequences, the training batch size, and the number of training epochs. Similar to previous experiments, the search space of the algorithms was deliberately kept conservative, and similar parameters were used for each algorithm in order to mitigate any potential expert bias in the results. This illustrates that in both experiments, improvements in sustainability are not contingent upon extreme fine-tuning or specialized knowledge, but rather on the systematic application of energy optimization principles.