## 2 Materials and Methods
### Methodology
#### 2.1.2 Data Extraction  
When initiating monitoring, we realized that accessibility was not optimal. Therefore, we decided to opt for the second option, which consisted of extracting data internally and periodically for each cycle generated by the manufactured parts.  
Data were extracted from an injection machine at TOP Injection collaborating with a company specializing in plastic injection molding. The data capture occurred over a specific period at the beginning of a shift change to capture the initial process conditions.  
Figure 4 shows the interactive interface provided by the injection machine with data on cycle count, cycle run time, injection speed, and position. All information was saved in.CSV format to facilitate handling when working with the data. Approximately 7 h with 600 records were taken as a basis for working with the model, using 80% for training and 20% for testing and validation [25].  
Figure 5 shows the standard process for developing and implementing a Machine Learning model. This iterative process involves the construction of mathematical models capable of learning patterns from data. It begins with the collection and preparation of relevant data, which are then analyzed and transformed to be used in training an algorithm. Once the appropriate algorithm is selected, the model is trained by adjusting its parameters to minimize prediction errors. Subsequently, the model is evaluated using a test dataset to measure its performance. If the results are satisfactory, the model is deployed in a real system to perform tasks such as classification, prediction, or content generation. It is important to note that Machine Learning models must be continuously monitored and updated to ensure their accuracy and relevance over time.  
Figure 4: Injection machine monitoring interface (taken from WOOJIN-PLAIMM DL-45 injection machine manuals).  
An exploratory data analysis (EDA) was conducted to understand the structure and relationships between the variables. Descriptive statistics were calculated, and the distributions of key variables, such as injection time, cycle time, and mold pressures, were visualized graphically. Additionally, possible correlations between these variables were explored using appropriate statistical techniques [26].  
Based on the EDA and consultation with field experts, the most relevant variables for the plastic injection molding process were identified. These variables included injection time, cycle time, maximum injection pressure, holding pressure, and average backpressure [27].  
Classification models were constructed using Machine Learning techniques, including Random Forest and Logistic Regression. These models were trained using the extracted data, and their performance was evaluated using cross-validation techniques. Metrics such as accuracy, sensitivity, and specificity were used to evaluate the predictive capability of the models [28].  
An intelligent agent was integrated into the operating environment where it can interact with the injection system and adapt to real-time changes. The purpose is to monitor its performance and make adjustments or improvements to the model as needed to maintain or improve its effectiveness.  
The results were carefully evaluated to determine their usefulness in identifying anomalies and classifying the state of the plastic injection molding process [29]. The models were compared to select the most suitable one for practical implementation in the industrial environment.  
This implementation was tested with a database different from the one initially extracted, in order to classify the degree of efficiency in manufacturing a type of mold, whether or not it meets the appropriate dimensions or characteristics [30].