*1.2. Machine-Learning Modeling*

Physical modeling approaches are the most common approaches for predicting system behaviors, but they rely on descriptions of physics concepts. Thus, they tend to be complex, as the detail of the model increased. Therefore, as the principle of Occam's razor states, physical modeling must balance complexity with assumptions in order to produce simplified and representative models [22,23].

On the other hand, artificial intelligence (AI) researchers have proposed several techniques that allow automatic generation of the models and equations based on measurements arranged in datasets. Furthermore, machine learning (ML), a field of AI, applies deterministic and heuristic methods to produce models with less complexity established in the raw measurements [22].

During the last two decades, ML models have exhibited high effectivity, accuracy, and performance in several fields, including energy applications. Furthermore, ML results for modeling have motivated researchers to apply its models to accurately predict the behavior of physical phenomena [22–30].

The ML modeling process can involve several stages, depending on its application, but a general description would include collecting data, preprocessing data, building a model, training, and testing. Furthermore, all the stages must be continually tuned to improve the results; i.e., the stages can repeatedly change across the entire process if the model requires efficiency improvements, as represented in Figure 1 [22].

**Figure 1.** Modeling process with ML.

### 1.2.1. Collecting Data

ML modeling uses algorithms, statistics, and measurements structured in a dataset to identify the process behaviors and mimic them in a model [31]. The data generation stage depends on the processes contained in the chosen model. They may include electrical, mechanical, optical, thermal, psychic, or chemical variables [22,24,25,32,33]; derive from statistical analysis [26,27]; or be constructed with text, multimedia, or even real-time reports [32–35]. Nevertheless, the datasets can be associated with a specific time and/or frequency domain [36,37].

#### 1.2.2. Preprocessing Data

After collecting and structuring the dataset, its variables need to be cleaned, processed, and filtered for the ML model. The processing stage includes several techniques, which can be human- or AI-designed, and they depend on the nature of the training data. For example, in natural language processing with text, preprocessing removes capitals [38]; in signal processing, wavelet transforms separate signals into their main components [39]; in image processing, convolution with the image filters extracts features [40]; in big data and data mining, dimensionality reduction is achieved [41].

The preprocessing data stages include normalization based on algorithms, such as MIN-MAX normalization, decimal scaling, and Z-scores; filtering redundant and inconsistent data; transformations such as linear, quadratic, polynomial, and histogram transformations; removing noisy data with techniques such as ensemble filtering, cross-validated filtering, and interactive partitioning; feature selection with exhaustive, heuristic, filter, and wrapper methods; and discretization to change from analog systems to digital ones [42].

Input features in ML modeling are representative when their information affects the output of the modeled system. Additionally, removing characteristics that are irrelevant or have low correlations from the results produces search spaces with lower complexity, boosting the capabilities of the training algorithm and improving the final model's efficiency [43,44].

One of the most used commonly techniques for removing redundant and inconsistent data in the second stage is feature Selection (FS). FS also makes it possible to reduce size, increase the efficiency and accuracy of predictive learning, and reduce the complexity of the final model [42]. The different FS approaches reported in the literature are constituted theoretically and apply methods such as filtering, wrapping, and embedding through techniques involving search algorithms, statistical criteria, and information, distance, dependency, and consistency measures [42].

## 1.2.3. Building Model

ML includes several models for predicting behavior that are supported by statistics and artificial intelligence. Different proposals have obtained different results depending on the ML model's application. The most common models are artificial neural networks, evolutionary algorithms, swarm intelligence algorithms, decision trees, naive Bayesian algorithms, logistic regression, fuzzy systems, gradient boosting machines, support vector machines, support vector regression, random forest algorithms, AdaBoost, simulated annealing, and hybrids of these models [22,24,26–28,31,34,44].

## 1.2.4. Training Model

Each ML model tunes its internal parameters with a training algorithm designed for the learning type. The most common learning types are supervised, unsupervised, reinforced, semi-supervised, transductive, self-trained, ensemble learning, boosting, and generative [31].
