## 4 Methodology
### Model Selection for Online Drift Detection and Adaptation
This ensures that the digital twin continues to learn and evolve, maintaining a high anomaly classification accuracy even as new patterns emerge within the cleanroom's cyber-physical systems' operational data. Thus, compared to other online learning models, an optimized and adaptive LightGBM model within its digital twin framework offers an efficient and scalable solution for the continuous and real-time demands of cleanroom monitoring. This empowers the continuous learning model as an indispensable tool in the domain of the preventive and predictive maintenance of cyber-physical systems. In addition to TWIN-ADAPT's optimized and adaptive LightGBM model, we consider several existing online drift detection and learning models to serve as baselines for comparison. These online learning models include the following:  
* **ARF-ADWIN:** Adaptive Random Forest combined with ADWIN drift detection. * **ARF-DDM:** Adaptive Random Forest combined with DDM drift detection. * **SRP-ADWIN:** Streaming Random Patches model combined with ADWIN drift detection. * **SRP-DDM:** Streaming Random Patches model combined with DDM drift detection. * **HTs:** Hoeffding Trees that incrementally adapt to data streams using the Hoeffding bound to determine the necessary samples for node splitting. * **EFDT:** Extremely Fast Decision Trees quickly adapt to concept drifts by splitting nodes upon reaching confidence levels. * **LB:** Leverage Bagging uses bootstrap samples and the Poisson distribution to construct diverse online ensembles. These models are selected for comparison due to their strong adaptability to concept drift and their robust data stream analysis capabilities. Both ARF and SRP are state-of-the-art drift adaptation methods that demonstrated superior performances in handling concept drift, as demonstrated in various experimental studies. Both methods are online ensemble models constructed with multiple HTs, which provide robust incremental learning capabilities. They do not require the tuning of data chunk sizes, which can lead to delays in drift detection and increased execution times in block-based ensembles. The choices of drift detection methods--ADWIN and DDM--are strategic: ADWIN excels at detecting gradual drifts, while DDM is more effective for sudden drifts. By combining these drift detection methods with ARF and SRP, we ensure that our base learners can handle both types of drifts efficiently. Additionally, three well-known individual drift adaptation models--EFDT, HT and LB provide a diverse range of mechanisms to adjust to changing data dynamics, making them ideal benchmarks for assessing their relative performances with our custom combination of online learning models and TWIN-ADAPT. Specifically, EPDT's rapid adaptation through immediate node splitting offers a contrast to more gradual drift adjustments, while HT's incremental learning approach and LB's unique leveraging of bootstrap samples offers unique perspectives on managing data variability and drift. By comparing these established models with TWIN-ADAPT's optimized and continuous learning-driven LightGBM model, we aim to demonstrate the effectiveness of our approach in classifying anomalies under varying conditions and drift scenarios in evolving data streams.