# Dataset Construction through Ontology-Based Data Requirements Analysis
## 3 Ontology-Based Approach to Data Requirements Analysis  
Since the performance and accuracy of an ML system directly depend on the quality and quantity of data used, data requirements analysis is crucial for improving the quality of an ML system. Data requirements refer to the description of data needed to achieve the expected training effect of the target system. The clear definition of data requirements helps ensure that the data obtained can satisfy specific analysis, modeling, or decision-making needs. Assuming that a company aims to develop an image recognition system for identifying product defects on the factory production line, the importance of data requirements for ML systems becomes evident in the following aspects:  
1. **Data Labeling**: Data requirements can help determine the types of labeled data the system needs to collect, such as the category, location, size, and other information about the products, which can guide the data labeling work, ensuring that the system receives accurate labeled data to support the training of machine learning models. 2. **Dataset Diversity**: Data requirements ensure that the system accepts diverse data, including various types of products, or videos captured under different lighting conditions, and images of products from different angles and scales, which can help ML systems better adapt to various real-world scenarios. 3. **Feature Engineering**: Data requirements can help to select and extract the most relevant features, thereby improving the performance of the system. Due to the significant impact of data on the behavior of the system, data are closely related to the domain in which the system operates. The various complex conditions within the domain make the data possess complex semantics. Therefore, we introduce the theory of ontology to describe the complex semantics of the domain within the specific system in order to clearly articulate data requirements. The introduction of ontology to some extent alleviates the difficulty of describing semantic complexity because ontology, as a carrier of domain knowledge, provides a structured representation method to represent semantic information as a collection of concepts and relationships. Based on ontology, this paper proposes a meta-model for the data requirement analysis pipeline process as shown in Figure 1. The meta-model consists of four layers: ontology-based domain model, criteria-based data requirements specification, dataset construction and model training and deployment. In general, data sources are processed in the following order. First, a semantic model for exploring problem space needs to be constructed at the domain modeling layer. The semantic model refers to theoretical knowledge from ontology and is used to describe entities, attributes and their relationships. Evaluation metrics for the problem space are provided, such as accuracy, RMSE, mAP, while some non-functional requirements, such as reliability, fairness, and security are also included. Then, it is determined whether the model files provided by users can be parsed by a supporting tool. The metadata files will be generated directly if possible, otherwise, they are manually created through the supporting tool and exported. The data requirements specification layer imports the metadata files and generates corresponding data requirements based on the proposed coverage criteria and algorithms. This paper proposes two criteria _attribute coverage criterion_ and _relation coverage criterion_, each of which deals with different categories of elements in the domain model, where the elements serve as the foundation for improving the dataset quality and constructing data requirements. The former aims to cover entities and the corresponding value of attributes, the latter aims to cover the relationships and entities. Figure 1: The process meta-model of ontology-based data requirements analysis approach. The dataset construction layer first obtains the user's initial data set and determines whether the type of data is text.