# Rule-Based DSL for Continuous Features and ML Models Selection in Multiple Sclerosis Research
## 3 Dsl Design
### Meta Model Design
Here, to evaluate the effectiveness of our DSL, we will employ it to identify the MRI features that exhibit stronger associations with motility and those that have a greater influence on cognitive abilities. Furthermore, by utilizing the historical data available, we will apply the selected models to help predict the future trajectories of patients. Based on our data collection, we aim to analyze the relationship between T2-related MRI features and patients' walk and process speed times in the last several years. The workflow begins by employing AutoML to identify the optimal pipeline using the initial dataset from the first four years. The system logs the preprocessing steps, best models, and most relevant features. Domain experts can then refine the features, train additional ML models, and compare the outcomes. Based on a thorough evaluation, users can specify the ML model and the most crucial features and assess the predictive results. As listed in Section 3, the models can be defined as introduced. The DSL operates in a sequential manner; it commences with the AutoMLModel to log the best pipeline. Subsequently, users can define other ML models to determine if they yield improved results. With the rules predefined, the system can initiate continuous training and obtain the results. All experiments were conducted using an Acer Nitro AN515-58 laptop equipped with a 12 th Gen Intel Core i7-12700H processor (2.7 GHz, 14 cores, 20 logical processors) and 16 GB of RAM. We provide the real training model definitions in Appendix B. #### 4.1.1 Automl

In our AutoML approach, we initially input all features to generate initial expressions and explore potential models. Our study utilized two primary datasets: the initial dataset from 2017-2020 containing 16,263 records, and a validation dataset from 2021-2023 with 12,838 records. These substantial sample sizes ensure robust model training and evaluation. The AutoML framework, implemented using TPOT's genetic algorithm, incorporates early plausibility checks to enhance reliability. It automatically assesses data sufficiency, flagging instances where the dataset might be too small for reliable model training. Additionally, the framework monitors convergence during the training process, alerting users to potential issues such as non-convergence or overfitting. Utilizing TPOT's genetic algorithm, we adjust the population size and generations to optimize the process. We experiment with two configurations: 30 generations and a population size of 300, as shown in Line 10, as well as 10 generations with a population size of 100 Line 12. Our focus is on analyzing the relationships between features related to T2 images, process speed times, and walk speed. Our DSL facilitates the reuse of definitions such as features in subsequent procedures. The results, as depicted in Figures 1-4, showcase the performance of the models and feature importance under different configurations. we observe a typical case of overfitting in the Figure 1a: the training score (red line) starts high and remains close to 1.0 as more training examples are added in 50 min. However, the cross-validation score (green line) initially increases with more training data but then starts to decrease after reaching a peak, indicating that the model is overfitting to the training data and performing poorly on unseen data. In Figure 1b, the training score (red line) decreases slightly in 10 min as more training data are added, which is expected behavior. The cross-validation score (green line) steadily increases and converges towards the training score, suggesting that the model is learning the underlying patterns in the data without overfitting. The section model is generalizing well, and we choose this as the better result. Similarly, we perform the same analyses in Figure 3a,b. The system identifies the optimal pipeline, encompassing data preprocessing, feature selection, and a regression algorithm.