# Rule-Based DSL for Continuous Features and ML Models Selection in Multiple Sclerosis Research
## 3 Dsl Design
### Meta Model Design
The AutoML model offers a streamlined and automated approach, while the manual selection models provide more control and flexibility for researchers and practitioners to leverage their domain knowledge and expertise. Ultimately, the choice of approach depends on the specific requirements of the problem, the available resources, and the trade-offs between automation and manual interventions. By understanding the capabilities and limitations of each approach, researchers and practitioners can make informed decisions and develop effective ML solutions tailored to their needs. The three approaches presented constitute a layered framework, allowing users to progressively refine and optimize their models according to their expertise and the level of control they desire. This framework also facilitates a better understanding of data flow through the use of more abstract and less technical language. In the following section, we will demonstrate the practical implementation and application of these modelson our dataset, showcasing their performance and discussing the insights gained from each approach. ```
1 modelMLModelSelection task regression(
2 mlModelRandomForest{
3 parametername=\"random_state\"value=[2,5,10,20,50,100,200,500,1000]
4 parametername=\"n_estimors\"value=[10,50,100]
5)
6 mlModelDecisionTree
7 parametername=\"max_depth\"value=[3,5,7,10]
8 parametername=\"min_samples_split\"value=[2,5,8,10]
9 parametername=\"min_samples_leaf\"value=[1,2,4,6]
10)
11 mlModelSVM{
12 parametername=\"C\"value=[0.1,1,10,100,1000]
13 parametername=\"gamma\"value=[0.0001,0.001,0.01,1]
14 parametername=\"kernel\"value=['rbf']
15)
16 selectpst_filter
17 mt_test_17_20.212 ewvel>3.0,
18 mt_test_17_20.202 ewerb>0.001,
19 mrt_test_17_20.202 velj%>0.5,
20 mrt_test_17_20.202 velj%<1.0,
21 mrt_test_17_20.202 lengt>=1.0,
22 mrt_test_17_20.212 ewvel>0,
23 mrt_test_17_20.201 lengt>=0.3
24 metricmse,r2_score,mse,mse
25 rulesetselectionRules{
26 rule:
27 if(SVM.r2_score<0.85 andSVM.mse>0.2)thenRandomForest,pst
28 rule:
29 ifRandomForest.r2_score>0.8 thenRandomForest,pst_filter
30 rule:
31 ifRandomForest.r2_score<0.85 thenDecisionTree,pst
32}
33 startSWwithpst
43 showmodels,features
34}
```
Listing 3: Model for manual selection. ```
1 modelMLModelSelectiontaskclassification(
3 mlModelDecisionTree
4 parametername=\"max_depth\"value=5
5 parametername=\"min_samples_split\"value=5
6 parametername=\"min_samples_leaf\"value=2
7 parametername=\"max_features\"value=\"auto\"
8)selectpst
9 mrt_test_17_20.212 ewvel,
11 mrt_test_17_20.202 verb,
12 mrt_test_17_20.202 velj%,
13 mrt_test_17_20.20_get_score
14 startDecisionTreewithpst
15 showfeatures
16}
```
Listing 4: Model for manual selection. ## 4 DSL Implementation and Demonstration

This research focuses on developing a DSL to streamline the process of model and feature selection for ML pipelines in the context of MS prediction and feature relationship discovery. In the Section 3, we introduced our meta model design and how to instantiate the models and features. In this section, we will show the running results and how we use this DSL to progressively obtain better results. To manage the ML lifecycle and track experiments, the DSL integrates MLflow. MLflow is an open-source platform for managing end-to-end ML workflows. It provides functionality for tracking experiments, packaging code into reproducible runs and sharing and deploying models. The DSL utilizes MLflow's tracking APIs to log relevant information about each pipeline evaluation, such as the models used, hyperparameter values, performance metrics, and the resulting optimizedpipeline. However, the design of the DSL is modular and extensible, allowing for future integration with other ML libraries and frameworks. ### Training Workflows

Before proceeding, it is important to note that all the data used in this evaluation are anonymized to ensure privacy and confidentiality.