# Isolated Forest-Based Prediction of Container Resource Load Extremes
## 3 Load Prediction Model
### Load Prediction Model Based on Isolated Forest  
In order to accurately predict extreme values in container CPU utilization, the ExtremoNet model is presented in this paper. ExtremoNet consists of the following three separate models: a normal value model, used to train the normal values in the predicted data; an extreme value model, used to train the extreme values in the predicted data; and the classifier model, trained to detect whether a value is categorized as a normal value or an extreme value. This model combines the isolated forest algorithm and the classification sub-model to detect and integrate the information on abnormal extreme values to improve the accuracy of predicting extreme patterns. By introducing a classification sub-model, ExtremoNet can more accurately distinguish between normal and extreme events, ensuring that it remains efficient and accurate in a variable container load prediction environment. In addition, a temporal convolutional network (TCN) is used to sensitively capture short-term peak variations and minor fluctuations in a CPU to enhance the granularity and accuracy of the predictions. Figure 1 illustrates the structure of the proposed ExtremoNet model. The model uses time-series data to estimate anomaly scores for each data point via an isolated forest algorithm, and then combines these scores with the raw data as features for model training. Figure 1: ExtremoNet model structure diagram. The data flow is assigned to the following three paths in the model design: the extreme value prediction branch focuses on rare but important extreme load cases, the normal value prediction branch handles the constant load, and the auxiliary classification network is responsible for distinguishing between these two cases and improving the accuracy of the overall model in classifying the fluctuating nature of the data. The final prediction is accomplished by integrating the outputs of the two sub-prediction models and the decisions of the classification network. If the classification network judges the current data point as being extreme, the model focuses on the output; if it judges it to be normal, the output of the normal-value model is given a higher weight. The advantage of this approach is that it allows the model to dynamically adjust its focus on different types of loads, thus improving the overall accuracy of the prediction. To describe the load prediction model in detail, its mathematical definition is first given. Let the time series data be \(X_{t}\), where \(t\) denotes the time step, and the goal of model \(F\) is to predict the load at the next time step \(X_{t+1}^{*}\). Model \(F\) contains three sub-models, \(F_{\text{ext}}\), \(F_{norm}\), and the auxiliary classification network \(C\). The mathematical representation of the model can be summarized as follows:  
First, the function for calculating the abnormal score for the isolated forest algorithm is defined as follows:  
\[A(X)=f_{Forest}(X) \tag{2}\]  
The anomaly scores are combined as new data features to the original data as follows:  
\[F(X)=X,A(X) \tag{3}\]  
The classification network determines whether a data point is a normal or extreme fluctuation, giving probabilities \(P_{norm}\) and \(P_{ext}\). \[P_{norm}(X),P_{ext}(X)=C(F(X)) \tag{4}\]  
Then, based on the output of the classification network, the appropriate prediction model is selected as follows:  
\[Y=P(X)=P_{norm}(X)\cdot F_{norm}(F(X))+P_{ext}(X)\cdot F_{ext}(F(X)) \tag{5}\]  
Ultimately, the output of the model Y is a weighted sum of the outputs of the two models. In the above mathematical framework, model \(F\) is able to adaptively predict both extreme and normal values. In predicting loads, the model not only captures daily fluctuation patterns, but also reacts to sudden extremes, thus enabling efficient adaptation to uncertain environments.