# Rule-Based DSL for Continuous Features and ML Models Selection in Multiple Sclerosis Research
## 3 Dsl Design
### Meta Model Design
```
1 loadmrt\_pst\_wst21\_23 from\"D:\Project\RealData\WSData.db\"
2 modeluMoldModeltaskregression{
3 mlModeluMold\_pstypeAutoML
35 selectpst
6 mrt\_pst\_wst21\_23.t2 lesvol,
7 mrt\_pst\_wst21\_23.t2 overb,
8 mrt\_pst\_wst21\_23.t2 voljur,
9 mrt\_pst\_wst21\_23.t2 voljur,
10 mrt\_pst\_wst21\_23.t2 voljur,
11 mrt\_pst\_wst21\_23.t2 voljur,
12 mrt\_pst\_wst21\_23.nt2 lesc,
13 mrt\_pst\_wst21\_23.nt2 lesc,
14 mrt\_pst\_wst21\_23.nt2 lesc,
15 mrt\_pst\_wst21\_23.nt2 lesc,
16 mrt\_pst\_wst21\_23.nt2 lesc,
17 selectwst
18 mrt\_pst\_wst21\_23.t2 newcl,
19 mrt\_pst\_wst21\_23.t2 covarb,
20 mrt\_pst\_wst21\_23.t2 voljur,
21 mrt\_pst\_wst21\_23.t2 voljur,
22 mrt\_pst\_wst21\_23.t2 voljur,
23 mrt\_pst\_wst21\_23.t2 voljur,
24 mrt\_pst\_wst21\_23.nt2 lesc,
25 mrt\_pst\_wst21\_23.nt2 lesc,
26 mrt\_pst\_wst21\_23.nt2 lesc,
27 mrt\_pst\_wst21\_23.nt2 lesc,
28 mrt\_pst\_wst21\_23.nt2 lesc,
29 metricmse,r2\_score,mse,mse,msese
30 startautoMLgeneration-300 population\_size=30 withwst
31 startautoMLgeneration-300 population\_size=30 withpst
32}
```
Listing A4: AutoML for data from 2021 to 2020. ```
1 loadmrt\_pst\_wst21\_23 from\"D:\Project\RealData\WSData.db\"
2 modeluMoldModeltaskregression{
3 mlModeluMold\_pstypeAutoML
35 selectpst
36 mrt\_pst\_wst17\_20.t2 lesvol,
37 mrt\_pst\_wst17\_20.t2 voljur,
38 mrt\_pst\_wst17\_20.t2 voljur,
39 mrt\_pst\_wst17\_20.t2 voljur,
40 mrt\_pst\_wst17\_20.nt2 lesc,
41 mrt\_pst\_wst17\_20.t2 voljur,
51 mrt\_pst\_wst17\_20.nt2 lesc,
52 mrt\_pst\_wst17\_20.t2 voljur,  
```
1 loadmt_pst_wst17_20 from\"D:\Project\RealData\WSData.db\"
2 modelMLModelSelection taskregression(
3 mLModelRandomForest{
4 parametername=\"random_state\"value=[2,5,10,20,50,100,200,500,1000]
5 parametername=\"m_estimators\"value=[10,50,100]
6}
7 mlModelDecisionTree{
8 parametername=\"max_depth\"value=[3,5,7,10]
9 parametername=\"min_samples_split\"value=[2,5,8,10]
10 parametername=\"min_samples_leaf\"value=[1,2,4,6]
11}
12 mlModelSW{
13 parametername=\"C\"value=[0.1,1,10,100,1000]
14 parametername=\"gamma\"value=[0.0001,0.001,0.01,0.1,1]
15 parametername=\"kernel\"value=['rbf']
16}
17 selectwt
18 mt_pst_wst17_20.t2 overkw,
20 mt_pst_wst17_20.t2 voljwr,
21 mt_pst_wst17_20.t2 volprv,
22 mt_pst_wst17_20.t2 lessen,
23 mt_pst_wst17_20.nt2 lesen,
24 mt_pst_wst17_20.nt2 lesev,
25 mt_pst_wst17_20.wst_score
27 metricmse,r2_score,mse,mse
28 ruleSetselectionRules{
29 rule:
31 ifSW.r2_score<0.8 thenRandomForest,wst
32 rule:
33 ifRandomForest.r2_score<0.85 thenDecisionTree,wst
34}
35 startSWMwithwst
36}
37
38}
```  
Listing 11: Final training for different features with the best models. ```
1 loadmt_pst_wst21_23 from\"D:\Project\RealData\WSData.db\"
2 modelMLModelSelection taskregression(
3 mLModelRandomForest{
4 parametername=\"random_state\"value=100
5 parametername=\"m_estimators\"value=80
6}
7 mlModelDecisionTree{
8 parametername=\"max_depth\"value=10
9 parametername=\"min_samples_split\"value=10
10 parametername=\"min_samples_leaf\"value=9
11}
13
14
15 selectpst
16 mt_pst_wst21_23.t2 levol,
17 mt_pst_wst21_23.t2 overkw,
18 mt_pst_wst21_23.t2 voljwr,
19 mrt_pst_wst21_23.t2 voljwr,
20 mrt_pst_wst21_23.t2 volprv,
21 mt_pst_wst21_23.wt_score
22
23 metricmse,r2_score,mse,mse
24
25 startDecisionTreewithwst
26 startRandomForestwithpst



## References

* _[PERSON] et al. (2022)_ [PERSON]; [PERSON]; [PERSON] Machine-Learning-Based Disease Diagnosis: A Comprehensive Review. _Healthcare_**2022**, _10_, 541. [CrossRef] [PubMed]
* _[PERSON] et al. (2023)_ [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON] Building a monitoring matrix for the management of multiple sclerosis. _Autommun. Rev._**2023**, _22_, 103358. [CrossRef]
* _[PERSON] et al. (2021)_ [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; et al. 2021 MAGNIMS-CMSC-NAIMS consensus recommendations on the use of MRI in patients with multiple sclerosis. _Lancet Neurol._**2021**, _20_, 653-670. [CrossRef] [PubMed]
* _[PERSON] et al.