These weighted inputs are then aggregated into a sum, which acts as the input for a nonlinear activation function. This function introduces non-linearity to the processing, enabling the network to learn and represent more complex functions. The output of the activation function is then sent to the next layer in the network or, in the case of the output layer, becomes the final output of the model. The results from one layer serve as inputs to the successive layer, enabling the network to extract progressively more intricate features from the data. The architecture of the network, including the number of layers and neurons within each layer, can be strategically fine-tuned to enhance the performance of the model. Within an ANN, each layer is equipped to solve the algebraic expression: