# Rule-Based DSL for Continuous Features and ML Models Selection in Multiple Sclerosis Research
## 3 Dsl Design
### Meta Model Design
The current scope of the DSL is limited to supporting scikit-learn [28] compatible regression models and pipelines. By focusing on scikit-learn, the DSL can leverage the extensive ecosystem of models and tools built around this library. With the extensibility of the meta model design, we aim to integrate the model with additional ML technologies and neural networks in the future. Additionally, we intend to invite medical experts to evaluate the usability and accuracy of our DSLs, with a focus on the continuous improvement of the models and validation of the results. The first example, shown in Listing A1, showcases how to define AutoML in our real use case model. All these models could be defined in the same file and share the data loader from the _load_ command. Here, we load the dataset from the sqlite database. Also, we support the loading of multiple datasets from csv files and databases, and we also support joint queries between them, as shown in Listing 2. This model defines an AutoMLModel task for regression, where the _mlModel_ parameter is set to _autoML_, indicating the use of an automated ML algorithm. The select _pst_ statement specifies that the initial set of features should be selected from the entire dataset about MRI and process speed time features. Additionally, the _metric_ parameter defines the evaluation metrics to be used, such as mean squared error (mse), R-squared score (r2_score), mean absolute error (mae), and root mean squared error (rmse). Finally, the start _autoML_ with the _pst_ statement initiates the AutoML process with the specified initial features and shows the models and features. AutoML techniques have gained significant attention in recent years due to their ability to streamline the ML workflow and achieve competitive performance without extensive manual intervention. Here, we integrate TPOT [29], which uses genetic programming to automate the optimization of ML pipelines with techniques like feature selection, feature construction, model selection, and hyperparameter tuning. TPOT is an AutoML system that uses genetic programming to optimize ML pipelines. TPOT supports various models provided by the scikit-learn library, including linear models, support vector machines, decision trees, random forests, and ensemble methods. We could set generations and population sizes to fine tune this model. * Generation: This parameter determines the number of iterations that the genetic algorithm will run. Each generation involves creating a new population of ML pipelines by applying genetic operations (crossover and mutation) to the best-performing pipelines from the previous generation. * A higher number of generations allows for more thorough exploration of the solution space, potentially finding better pipelines. * However, it also increases the computation time. * In our DSL, users can specify this parameter as generation = 100
* Population size: This parameter sets the number of individuals (ML pipelines) in each generation. * A larger population size increases the diversity of solutions explored in each generation. * It can lead to better results but at the cost of increased computation times. * Users can set this in our DSL as population_size=50

The genetic processes in AutoML, specifically in TPOT, involve operations like crossover (combining parts of two high-performing pipelines) and mutation (randomly altering parts of a pipeline) to evolve increasingly effective ML workflows. These processes explore various combinations of preprocessing steps, feature selection methods, and ML algorithms. As a result, AutoML can discover complex, multi-step pipelines that often outperform manually designed models, potentially including unexpected feature transformations or ensemble methods that a human data scientist might not have considered. The output typically includes the best-performing pipeline architecture, optimized hyperparameters, and performance metrics, providing users with a ready-to-use model and insights into effective feature engineering strategies for their specific dataset.