Table of Contents
Fetching ...

Code Generation for Machine Learning using Model-Driven Engineering and SysML

Simon Raedler, Matthias Rupp, Eugen Rigger, Stefanie Rinderle-Ma

TL;DR

The paper addresses the gap between SysML-based formalization of machine-learning tasks and their executable implementation by introducing a template-driven, model-transformation approach. It leverages an intermediate representation and a JSON-based mapping to bind stereotypes to code templates, enabling automatic generation of runnable notebooks in languages like Python. The method is evaluated on a weather-forecast use case, demonstrating feasibility, modifiability, and potential for standardization in data-driven engineering within MBSE contexts. This work provides both a practical workflow and theoretical basis for integrating data-driven ML tasks into model-based engineering practices.

Abstract

Data-driven engineering refers to systematic data collection and processing using machine learning to improve engineering systems. Currently, the implementation of data-driven engineering relies on fundamental data science and software engineering skills. At the same time, model-based engineering is gaining relevance for the engineering of complex systems. In previous work, a model-based engineering approach integrating the formalization of machine learning tasks using the general-purpose modeling language SysML is presented. However, formalized machine learning tasks still require the implementation in a specialized programming languages like Python. Therefore, this work aims to facilitate the implementation of data-driven engineering in practice by extending the previous work of formalizing machine learning tasks by integrating model transformation to generate executable code. The method focuses on the modifiability and maintainability of the model transformation so that extensions and changes to the code generation can be integrated without requiring modifications to the code generator. The presented method is evaluated for feasibility in a case study to predict weather forecasts. Based thereon, quality attributes of model transformations are assessed and discussed. Results demonstrate the flexibility and the simplicity of the method reducing efforts for implementation. Further, the work builds a theoretical basis for standardizing data-driven engineering implementation in practice.

Code Generation for Machine Learning using Model-Driven Engineering and SysML

TL;DR

The paper addresses the gap between SysML-based formalization of machine-learning tasks and their executable implementation by introducing a template-driven, model-transformation approach. It leverages an intermediate representation and a JSON-based mapping to bind stereotypes to code templates, enabling automatic generation of runnable notebooks in languages like Python. The method is evaluated on a weather-forecast use case, demonstrating feasibility, modifiability, and potential for standardization in data-driven engineering within MBSE contexts. This work provides both a practical workflow and theoretical basis for integrating data-driven ML tasks into model-based engineering practices.

Abstract

Data-driven engineering refers to systematic data collection and processing using machine learning to improve engineering systems. Currently, the implementation of data-driven engineering relies on fundamental data science and software engineering skills. At the same time, model-based engineering is gaining relevance for the engineering of complex systems. In previous work, a model-based engineering approach integrating the formalization of machine learning tasks using the general-purpose modeling language SysML is presented. However, formalized machine learning tasks still require the implementation in a specialized programming languages like Python. Therefore, this work aims to facilitate the implementation of data-driven engineering in practice by extending the previous work of formalizing machine learning tasks by integrating model transformation to generate executable code. The method focuses on the modifiability and maintainability of the model transformation so that extensions and changes to the code generation can be integrated without requiring modifications to the code generator. The presented method is evaluated for feasibility in a case study to predict weather forecasts. Based thereon, quality attributes of model transformations are assessed and discussed. Results demonstrate the flexibility and the simplicity of the method reducing efforts for implementation. Further, the work builds a theoretical basis for standardizing data-driven engineering implementation in practice.
Paper Structure (25 sections, 7 figures)

This paper contains 25 sections, 7 figures.

Figures (7)

  • Figure 1: Sample stereotype defining a text and CSV data source.
  • Figure 2: Sample application of stereotypes and semantic integration.
  • Figure 3: A sample model transformation to load a CSV File.
  • Figure 4: Sample input model.
  • Figure 5: Mapping configuration.
  • ...and 2 more figures