Abstract
Machine learning (ML), a prominent branch of artificial intelligence, is increasingly applied in material design, particularly for magnesium composites. In this study, random forest models were used to predict mechanical properties and fractographic behavior using regression classification, respectively. Both the regression and classification models of the random forest demonstrated high accuracy in predicting new optimal mechanical properties for a composite containing 0.16 wt% graphene, which was enhanced through T6 heat treatment and equal channel angular pressing (ECAP). The predictions were further validated through laboratory experiments. Although not all predicted mechanical property values exceeded the optimal values obtained from the experiments, the strain-hardening capacity of the ML-recommended samples was higher than that of the experimental samples. In addition, the predicted surface features using fractography closely matched the experimental validation, indicating consistent ductile behavior.
Similar content being viewed by others
1 Introduction
The development of lightweight materials is a trend in industrial development due to their favorable environmental and economic impacts. Magnesium and alloys are lightweight metals that are lighter than steel and aluminum. These materials have excellent mechanical properties and are promising for industrial applications [1]. There are several types of magnesium and alloys, such as aluminum–manganese (AM), aluminum–silicon (AS), and aluminum–zinc (AZ) [2]. Aluminum–zinc elements are commonly used as magnesium alloying elements because they are economical and highly soluble. The addition of aluminum to magnesium alloys improves the alloy’s strength and melting point [3].
AZ–magnesium alloys, especially AZ91, can be developed as metal matrix composites with carbon-based reinforcement, such as graphene, to enhance their mechanical properties. Graphene is a carbon-based material that provides an alternative reinforcement to enhance the mechanical properties of magnesium composites [4]. Stir-casting is commonly used to fabricate magnesium composites owing to its ease of use and high-scale production. The mechanical properties of metal matrix composites, especially with AZ–magnesium alloys, can be improved by applying different heat treatments, such as T6 heat treatment [5]. In addition to heat treatment, these materials can also be improved using mechanical working, such as equal channel angular pressing (ECAP) [6].
The mechanical properties of composites are evaluated by determining yield strength (YS) and ultimate tensile strength (UTS), which are derived from the engineering stress–strain curve [7]. The engineering stress–strain curve illustrates the deformation behavior of the specimen under a progressively increasing applied load until fracture takes place [8]. Stress, measured in megapascals (MPa), is defined as the applied force (F, in newton) divided by the initial cross-sectional area of the specimen (A, in square millimeters) as shown in Eq. (1). Strain, expressed as a percentage (%), represents the material’s deformation under applied stress and is calculated as the ratio of the change in length (ΔL) to the original length of the specimen (L₀) before loading, as presented in Eq. (2) [9].
The mechanical properties of materials can significantly influence their fractographic resource, which is often analyzed to evaluate the joining efficiency and fracture patterns of tensile specimens. However, the fracture area alone cannot effectively reveal the detailed fracture behavior. Instead, examining the cross-sectional area and conducting observations using scanning electron microscope (SEM) provides more comprehensive insights. Images from fractography illustrate the surface features, which allow the classification of two types of fractures, i.e., brittle and ductile [9].
Fractography examination is used to evaluate improvements in mechanical properties and surface features. However, it has some limitations since it is time-consuming, high-cost, and requires labor. Thus, an effective method is required to solve these limitations. The machine learning (ML) method, an artificial intelligence branch, can be utilized as a novel approach for designing AZ91 magnesium alloy composites. ML can transform material design by predicting the behavior of materials, especially their mechanical properties [10]. For instance, Huang et al. [11] used ML to predict the mechanical properties of magnesium matrix composites as an innovative tool for designing materials.
Regression is one of the ML models that can be used as a prediction tool because it is suitable for predicting continuous data, such as mechanical properties. In addition, many researchers have used regression models to predict mechanical properties. A previous study employed linear regression to predict mechanical properties with an accuracy of more than 95% [12]. Although linear regression can be an effective prediction tool, other methods, such as the random forest regression model, can provide better accuracy and efficient handling of nonlinear data [13]. For example, Kwan et al. [14] used random forest regression to predict the mechanical properties of γ-TiAl alloys, achieving an R2 of approximately 0.9856 (98.56%) for tensile strength prediction. Additionally, Zhao et al. [15] applied ML methods, including random forest regression, to predict the mechanical properties of carbon fiber-reinforced polymers with an accuracy of 99%. Dong et al. [16] further stated that the random forest model had good performance in small data prediction on alloy properties.
Random forest is a tree-based ML model that uses multiple weak decision tree learners grown in parallel to simultaneously reduce bias and variance. The proposed method combines the outputs of numerous decision tree algorithms to improve predictive performance. The random forest predictor can be defined in Eq. (3), where (x) represents the input vector comprising various values from the training data. Here, \(T(x)\) represents the prediction of a single individual decision tree, K denotes the number of trees, and the final prediction \((rf\left(x\right))\) is obtained by averaging the outputs of all the trees. The term \(\sum_{k-1}^{k}T(x)\) represents the sum of predictions from all K trees [17].
The random forest is widely used not only for regression but also for classification tasks, making it a versatile method for developing predictive models across various fields [18]. This model offers several advantages, including the ability to predict numerical values without requiring feature standardization and a strong resistance to overfitting [19]. However, it also has limitations, such as a lack of interpretability and reduced performance in situations involving class imbalance [11]. A schematic representation of the random forest model is shown in Fig. 1. Bahl et al. [20] applied random forest classification for nanomaterial grouping, achieving a high R2 value of approximately 0.82. Furthermore, the proposed random forest classification model is well-suited for predicting surface features using fractography, particularly when dealing with categorical data.
Schematic representation of random forest machine learning model [21]
In this study, we used AZ91 magnesium alloy as the matrix material and graphene as the reinforcement. The composite was further enhanced using T6 heat treatment and ECAP, with fabrication performed through stir-casting. We observed the optimal mechanical properties and ductile fractographic examination in the AZ91-0.2 wt% graphene composite under T6, ECAP 1 Pass, and ECAP 2 Pass treatments [22]. Data from these composites were integrated into a random forest ML model to predict mechanical properties and fractographic examination with the goal of achieving high accuracy and identifying new optimal mechanical properties [15].
The random forest successfully predicted the mechanical properties and fracture behavior of AZ91 magnesium alloy composites reinforced with graphene. Furthermore, the model identified new optimization possibilities for the composites, which were experimentally validated. This novel approach highlights the potential of the random forest model, incorporating both regression and classification tasks, in industrial composite design, enabling the identification of optimal parameters to achieve desired properties effectively.
2 Methodology
In this study, we fabricated an AZ91 magnesium (comprising 8.95 wt% Al and 0.84 wt% Zn) matrix composite reinforced with graphene using stir-casting, achieving notable enhancements (datasets are provided in Table 1) as previously published [22]. Data from this study were collected for integration into an ML model. The input parameters included the reinforcement type (as-cast or without reinforcement and reinforced with graphene), reinforcement variation (0–0.2 wt%), heat treatment (no heat treatment, T4, and T6), and ECAP (0 to 2 passes). The output parameters were the YS and the UTS predicted using the random forest regression, while the fracture behavior was classified using a random forest classification model.
Figure 2 presents the schematic methodology used in this study. During data collection, data preprocessing was performed to define the input and output parameters. The statistical data are summarized in Table 2, focusing specifically on the variations in the reinforcement as input parameters, with the output parameters representing the mechanical properties in float form. Other input and output parameters related to fractographic examination, provided in character form, were excluded from the statistical calculations. The statistical data included key metrics, such as mean, standard deviation (SD), minimum, maximum, and Q1–Q3 values.
Before running the predictions, the data were split into training and test sets—80% were allocated for training while the remaining 20% were allocated for testing. In the second step, a random forest ML model was applied using 100 estimators and a random state of 42 for both regression and classification tasks. We used the Python programming language with JupyterLab software. The models were evaluated using performance evaluations, such as R2, mean absolute error (MAE), and root mean square error (RMSE).
In the performance evaluation, the regression models were assessed using various mathematical formulas. In these equations, \({X}_{i}\) denotes the predicted \({i}^{th}\) value, while \({Y}_{i}\) represents the actual data with value from the ground-truth dataset. In addition, m represents the total number of actual values, and \(\overline{Y}\) represents the mean of the actual values. Equation (4) displays the coefficient of determination (R2 or R-squared), which can be interpreted as the proportion of the variance in the dependent variable that can be predicted from the independent variables (accuracy) [23]. Next, the MAE was used to calculate the average absolute differences between the predicted and actual values, as shown in Eq. (5). Meanwhile, Eq. (6) represents the RMSE, which is the average root squared difference between the actual and predicted values [24].
In the classification model, performance was evaluated using metrics distinct from those used in regression, including Accuracy (ACC), as defined in Eq. (7), which represents the ratio of correct predictions. Precision (P), defined in Eq. (8), was employed to calculate the proportion of correctly predicted positive patterns. Recall (R), defined in Eq. (9), was used to calculate the proportion of actual positive patterns that were correctly identified. These metrics use true positives (TP) and true negatives (TN), which are summed to derive their respective values. In addition, false positives (FP) and false negatives (FN) represent the total number of incorrect positive and negative predictions, respectively [25].
Following the performance evaluation, the regression model was analyzed using a residual plot to visualize the differences between the actual and predicted values. Meanwhile, a correlation matrix was utilized to illustrate the relationships between the parameters. The classification model was determined using a confusion matrix and a correlation matrix. Subsequently, the predicted values were validated to assess the differences between the predicted and actual outcomes.
In the third step, new mechanical property optimizations were derived from the regression ML model and used to predict new fractographic examination based on the regression results. These predictions were validated through laboratory experiments by fabricating composites using the stir-casting method, followed by enhancement processes, such as T6 heat treatment and ECAP, via the A route (120°). Microstructure characterization was conducted using X-ray diffraction (XRD), Raman spectroscopy, and optical microscopy (OM) combined with energy-dispersive X-ray spectroscopy (SEM–EDS), while the tensile test was performed to evaluate the mechanical properties according to ASTM E8-69 standards. An average of three samples was taken for the characterization. Fractographic analysis was performed using SEM. Furthermore, all fabrication processes, microstructure characterization, and mechanical testing equipment and parameters were consistent with those used in a previous study [22].
3 Results and discussion
3.1 Prediction of mechanical properties and fractography examination using random forest machine learning model
3.1.1 Prediction of mechanical properties using random forest regression
In this prediction model, various input parameters were used to predict multiple-output parameters using software, specifically YS and UTS, based on the mechanical properties. Figure 3 illustrates the graph of the actual versus predicted data for these properties. The blue and green dots represent the training and test data, respectively, while the red line represents the perfect fit. In addition, the performance evaluation metrics for both the training and test outputs are shown in Table 3. The model demonstrated high accuracy, ranging from 92.52% (0.9252) to 98.80% (0.9880), which are close to 1. These results reflect the model's robust predictive capabilities [26].
The model was explained using a residual plot and correlation matrix generated using software (Fig. 4). In the residual plot, blue and green dots represent training and test residuals, respectively, while the red line indicates the perfect fit. The residual values for the training data were closer to the perfect fit line than those for the test data for both output parameters. In the correlation matrix, the highest value was approximately 0.92, and the lowest value was approximately 0.00. Higher values closer to 1 indicate a strong correlation between parameters [27].
The prediction of the output parameters, YS and UTS, along with the validation calculated from the percentage error between the actual and predicted values, is presented in Table 4. The highest error was 17.82% for the AZ91-0.2 wt% graphene as-cast UTS, whereas the lowest error was 0.33% for the AZ91-0.1 wt% graphene T6 YS. The highest performance was observed for the AZ91-0.2 wt% graphene ECAP 2 Pass sample (highlighted in bold in Table 4). This was further validated by the percentage error, which showed a YS error of approximately 4.57% and a UTS error of approximately 0.04%. In addition, most errors were less than 10%, which is generally acceptable for industrial applications [28]
The proposed model also provides a new optimization recommendation based on the reinforcement variations. Before the ML predictions, the optimum sample was identified as AZ91-0.2 wt% graphene under T6 and both ECAP passes treatments. However, the random forest regression model recommended AZ91-0.16 wt% graphene as the optimal composition in the mechanical properties prediction as illustrated in Fig. 5. Furthermore, to validate this recommended value, an experimental study was conducted to confirm its accuracy and effectiveness.
3.1.2 Prediction of fractography examination using random forest classification
In this classification model, the predicted fractography types for the training and testing datasets are illustrated in Fig. 6, which were generated using software. The performance evaluation metrics for training and testing were set to 1.0000 for all metrics (Table 5). The results indicate that the model achieved excellent prediction accuracy. In addition, all predicted samples matched the actual data. As shown in Table 6, the confusion matrix shows that the model has 10 TP, 2 TN, and no FP or FN.
The mean ductile type was positive, whereas the mean brittle type was negative. A TP indicates that both the actual and predicted data are positive, whereas a TN demonstrates that both the actual and predicted values are negative. Conversely, FP and FN occur when the actual and predicted values are opposite [29]. In this study, all predictions matched the actual values, demonstrating a perfect fit between the actual and predicted results.
The random forest classification model is explained using the confusion and correlation matrices, as shown in Fig. 7. First, the confusion matrix highlighted the performance of each classifier, illustrating the relationship between the predicted and actual classifications. In Fig. 7a, the training data results show seven ductile types and two brittle types, while Fig. 7b shows the test data results, with all predictions classified as ductile types. In the correlation matrix, the highest value was approximately 0.87, indicating a strong positive correlation between the parameters, whereas the lowest value was around 0.00, suggesting little to no correlation. Values closer to 1 indicate a strong relationship, whereas values closer to 0 indicate weaker or no correlation.
As discussed in the previous section, the new optimization recommendation based on the variations in the reinforcement identified AZ91-0.16 wt% graphene as a new optimal composition. The random forest classification model predicted that the fracture behavior of AZ91-0.16 wt% graphene under T6, ECAP 1 Pass, and 2 ECAP passes treatments would exhibit ductile characteristics (Fig. 8). To validate this prediction, an experimental study was later conducted to confirm the model's accuracy and effectiveness.
3.2 Validation of new optimizations through experiments
In the predictions using various parameters for the mechanical properties and fractography examination, several factors—such as the reinforcement type, reinforcement variation, heat treatment, and ECAP—play a role. First, the reinforcement type and variation in the composite materials can enhance the strength by promoting strong bonding between the matrix and the reinforcement [30]. Second, heat treatment processes involving controlled heating and cooling can modify a material's microstructure and increase its ductility before ECAP, significantly influencing its mechanical properties [5]. Lastly, ECAP can produce ultrafine-grained materials with high strength at room temperature [31].
When correlated with the ML prediction model, the optimal parameter type for each parameter was selected to achieve desirable mechanical properties, allowing the YS and UTS to be determined due to the multiple-output approach. Based on the new optimization recommendations from the random forest regression model, we re-fabricated the AZ91-0.16 wt% graphene composite, and enhanced it with T6 heat treatment, ECAP 1 Pass, or ECAP 2 Pass using route A at 120°. The next subsection presents the experimental validation with microstructure characterization and its correlation with mechanical properties and fractography, followed by the comparison of the prediction and the actual results.
3.2.1 Microstructure characterization
The microstructure of all samples was analyzed using XRD to identify the phases, while Raman spectroscopy was employed to detect graphene reinforcement. Phase composition and morphology were determined using SEM–EDS, and grain size was determined by OM.Additionally, the microstructural characterization results were correlated with the mechanical properties.
First, the XRD analysis, as shown in Fig. 9, revealed the existence of three phases in the magnesium composites: the primary phase, Mg0.97Zn0.03 (PDF 65-4596); and the secondary phase, Mg17Al12 (PDF 73-1148) and MgC2 (PDF 89-7745), which formed due to the addition of graphene reinforcement, leading to improved mechanical properties [32].
The intensity of the prismatic (10 \(\overline{1 }\) 1) plane was stronger in both ECAP samples than in the T6 sample due to dynamic recrystallization (DRX), which weakened the intensity of the basal (0002) plane [33]. Additionally, MgC₂ (magnesium carbide) was detected at 32.15° in all composite samples. The graphene peak (PDF 26-1080) was typically observed at 26.60° and/or 54.79° in the composite samples. However, due to the very small fraction of reinforcement, the XRD equipment could not detect graphene, showing the limited detection capability of XRD [34].
To determine each percentage of the phase, phase quantification analysis was performed (Table 7). The reference intensity ratio (RIR) method, which is suitable for bulk sample determination, was employed to determine the number of phases. The sum of the weights of all phases must be equal to 1 as shown in Eq. (10). To estimate the quantitative values of the significant phases, the RIR method was utilized again as outlined in Eq. (11). RIR is defined as the ratio of the most prominent peak of an unknown phase to the peaks of a standard phase. In this equation, Iiα denotes the highest intensity of the unknown phase, while RIRαc represents the strongest intensity ratio between the unknown and standard phases. Likewise, Iik corresponds to the highest intensity of the Iiα unknown phase, and RIRkc represents the strongest intensity ratio between the unknown k phase and the standard phase.
The secondary phase, Mg17Al12, has a detrimental effect on AZ91 composites [35]. The percentage of secondary phases was higher in both ECAP passes than in the T6 sample because of the fragmentation and redistribution of the phases. These variations were primarily influenced by DRX during ECAP, which significantly affected the microstructure and mechanical properties of the composites [36].
Several equations were utilized to quantify the effects of T6 and ECAP treatments on the composites as these processes influence the broadening and intensity of each composite’s diffraction peaks. Scherrer equation (12) was applied to determine the average crystallite size, where k represents the Scherrer constant (typically 0.9), λ denotes the X-ray radiation wavelength, β corresponds to the full width at half maximum (FWHM) of the peak (in radians), and θ is the Bragg angle. Additionally, crystallinity index was determined using the Segal equation (13), where Iₕₖₗ represents the maximum intensity measured at the (hkl) plane, and Iₐm denotes the intensity of the amorphous phase [37].
In addition to phase quantification, microstrain was determined using the Williamson–Hall method as described in Eq. (14). In this equation, ε represents microstrain, which is plotted against βcosθ and 4sinθ. ORIGIN software was used to derive the slope of the curve. Furthermore, dislocation density was calculated using Eq. (15) after determining the microstrain. In this equation, ρ represents dislocation density, d denotes crystallite size, b is the Burger’s vector (0.325 nm), and ε corresponds to the microstrain [37].
Table 8 presents all values calculated using Eqs. (12–15). Crystallite size, microstrain, and dislocation density values decreased from T6 to ECAP 2 Pass, while the crystallinity index decreased from T6 to ECAP 1 Pass and then increased at ECAP 2 Pass. These variations are attributed to the effects of grain refinement, which influence the microstructure and directly impact grain size, as explained in the SEM-EDS and OM analyses in the following paragraph, along with their effects on mechanical properties [38].
Raman spectroscopy was used to detect the graphene reinforcement in the samples. The results are shown in Fig. 10. Several characteristic peaks corresponding to the D, G, G*, and G’ bands were observed in the graphene reinforcement [39]. However, only the G* band was detected in all composite samples, with specific values of 2438.3188 cm⁻1 in the graphene reinforcement sample, 2437.61 cm⁻1 in the T6 sample, 2437.0681 cm⁻1 in the ECAP 1 Pass sample, and 2438.1594 cm⁻1 in the ECAP 2 Pass sample. Furthermore, the sole detection of the G* band confirmed the presence of graphene reinforcement in the samples, as reported in previous studies [22].
SEM observations revealed the presence of Mg17Al12 and MgC2 phases in all samples (Fig. 11). The Mg₁₇Al₁₂ phase in the T6 sample exhibited a lamellar structure, whereas that in the ECAP samples appeared spherical. These structural changes were attributed to the effects of DRX during ECAP, which was conducted at high temperatures to induce plastic deformation, leading to grain refinement. As a result, the lamellar structure was broken down into fine particles [40]. These treatments were also previously explained in Table 7, which presents the phase quantification results. The composition of secondary phases was higher in both ECAP samples than in the T6 sample.
The size of the secondary Mg17Al12 phase was measured using ImageJ software (highlighted with red circles). In the T6 sample, the phase size ranged from 11.01 µm to 30.56 µm, while in the ECAP 1 Pass sample, it ranged from 2.96 µm to 17.41 µm. Meanwhile, the phase size of the ECAP 2 Pass sample ranged from 0.86 µm to 17.30 µm. As illustrated in Fig. 11, EDS mapping confirms the presence of Mg, Al, Zn, and C within the sample microstructure, depicting the distribution of each element and the Mg0.97Zn0.03 phase. The presence of Mg17Al12 and MgC2 phases was further supported by EDS point analysis (Fig. 12). The formation of both phases has been previously reported [22].
The effects of the T6 and ECAP treatments resulted in grain refinement, leading to a reduction in grain size (Fig. 13). The average grain size of the T6 sample was significantly larger than that of both ECAP samples, where a noticeable reduction in grain size of the ECAP samples was observed. Specifically, the average grain sizes were 56.12 µm in the T6 sample, 19.76 µm in the ECAP 1 Pass sample, and 16.69 µm in the ECAP 2 Pass sample. Furthermore, the effect of DRX induced by ECAP resulted in the presence of both deformed and undeformed regions within the grains of both ECAP samples [41]. Figure 13 also presents the grain size distribution histogram for each sample, providing a detailed visualization of the grain size variations. Additionally, the grain refinement observed in the OM analysis correlates with the XRD and SEM results and influences the mechanical properties.
3.2.2 Mechanical properties and fractography
The mechanical properties of all composite samples were assessed using the tensile test. The engineering stress–strain curve is shown in Fig. 14. Results in Table 9 suggest that YS and UTS increased from T6 until ECAP 2 Pass. However, there was only a slight increase in UTS value from ECAP 1 Pass to ECAP 2 Pass. In addition, the ductility also increased because the elongation values increased from T6 until ECAP 2 Pass. These treatments resulted in grain refinement from T6 to ECAP 2 Pass, which increased the mechanical properties of the samples. Similarly, the secondary precipitate Mg17Al12 phase of T6 to ECAP was split into smaller particles, as explained in the previous section.
The grain refinement can be explained by the Hall–Petch equation, as shown in Eq. (16), where σy represents the yield strength of the composite, σ0 and K (130 MPa µm1/2) are constants related to the materials, and d represents the grain size [42, 43]. In this study, Eq. (17) can be used to estimate the increase in YS caused by grain refinement due to T6 heat and ECAP treatments, where dcom is the average grain size of the AZ91 composites and daz91 is the average grain size of the matrix composite [44].
The addition of graphene to metal matrix composites can significantly enhance their strength and lead to the formation of a new phase, MgC2. This phase influences the load transfer mechanism during tensile testing, where the load is transferred from the matrix to the nanoreinforcement (graphene). Improved interfacial bonding between the matrix and reinforcement further contributed to this effect. Equation (18) shows the load transfer equation with Vf as the reinforcement volume, S is the aspect ratio (1272), and \(\sigma\)m as the yield of the matrix of the composite [45].
In this study, weight fractions were used to determine the volume fraction of the reinforcement for calculating the load transfer mechanism using the formula in Eq. (19), where V represents the volume fraction, W denotes the weight fraction, and ρ signifies density. In addition, the subscripts f and m refer to the reinforcement and matrix, respectively [9].
Both the Hall–Petch and load values of all samples increased from T6 to ECAP 2 Pass. However, the load value was higher than the Hall–Petch value because the load transfer mechanism plays a more significant role as observed in earlier studies utilizing graphene reinforcement [46]. In addition, effective load transfer ensured strong interfacial bonding between the matrix and reinforcement. The higher load value also contributed to the reduction of the secondary phase particle size from T6 to ECAP 2 Pass, while the higher Hall–Petch value was associated with the decrease in grain size of the samples [33].
To determine the fracture behavior, the cross section of the fractured tensile specimen was observed using SEM, as depicted in Fig. 15. Dimple (ductile) fractures were present on all AZ91-0.16 wt% graphene composites treatments, and microvoids were identified in all samples due to the effect of stir-casting that formed harmful cavities. Furthermore, these fractures were observed on all samples since T6 and ECAP treatments can enhance ductility due to grain refinement. Next, the microvoids were decreased from the T6 until ECAP 2 Pass samples due to the ECAP filling effect and improved mechanical properties [47].
3.2.3 Comparison of prediction and actual results from experimental validation
The mechanical properties of AZ91-0.16 wt% graphene composites were predicted based on recommendations from the random forest regression model as shown in Table 10. The prediction errors were below 10%, except for the UTS of AZ91-0.16 wt% graphene ECAP 2 Pass despite an R2 value above 0.90. Additionally, the lowest error observed was 3% for the UTS of AZ91-0.16 wt% graphene ECAP 1 Pass.
Meanwhile, the error predictions for the YS of AZ91-0.16 wt% graphene ECAP 2 Pass exceeded 10%, which could be attributed to the R2 test for YS prediction being lower than the R2 test for UTS prediction, as explained in Sect. 3.1.1.
Compared to the optimum experimental results, the UTS values of AZ91-0.16 wt% graphene T6 and ECAP 2 Pass exceeded those of AZ91-0.2 wt% graphene under the same treatments (Fig. 16). However, the UTS of AZ91-0.16 wt% graphene in ECAP 1 Pass was slightly lower than that of AZ91-0.2 wt% graphene in ECAP 1 Pass. Furthermore, the YS values of AZ91-0.16 wt% graphene did not exceed those of AZ91-0.2 wt% graphene.
Although the recommendations from the ML model did not exceed the experimental optimum for all values, an analysis of the strain-hardening capacity of both composites revealed that the strain-hardening of all AZ91-0.16 wt% graphene composites was higher than that of AZ91-0.2 wt% graphene composites. The strain-hardening capacity, as shown in Eq. (20), represents the work-hardening ability of the composites, calculated using values of YS and UTS [37].
All strain-hardening values are presented in Table 11, with the highest value of approximately 1.1887 observed in AZ91-0.16 wt% graphene ECAP 2 Pass and the lowest value of approximately 0.7030 in AZ91-0.2 wt% graphene ECAP 2 Pass. Furthermore, strain-hardening influences both strength and ductility during plastic deformation and is also affected by grain refinement [48]. In addition, a higher strain-hardening capacity (Hc > 1) indicates that the sample exhibits greater ductility and toughness before fracture compared to samples with a lower strain-hardening capacity [49].
In correlation with the strain-hardening capacity of the materials, the work-hardening behavior can also be evaluated using Eq. (21), which defines the true plastic stress as a function of the derivative of true stress with respect to true strain—commonly referred to as the strain-hardening rate [37]. The calculated strain-hardening rates for each sample are plotted in Fig. 17. All samples exhibited a decreasing trend in strain-hardening rate as the stress increased, indicating a reduction in the material’s ability to harden at higher stress levels.
Compared to the experiment-based optimized samples, the strain-hardening rate of the ML-based optimized samples showed a smoother decreasing trend, indicating more stable hardening behavior. For example, in AZ91-0.2 wt% graphene, the strain-hardening rates under all treatments exhibited noticeable fluctuations, whereas AZ91-0.16 wt% graphene demonstrated a more consistent trend across all treatments. Furthermore, the samples optimized through ML showed better strain-hardening performance than those optimized solely through experimentation.
In contrast to the predictions of mechanical properties, results presented in Table 12 indicate that the predictions from the random forest classification model are consistent with the actual outcomes, with both the predicted and actual results classified as ductile. These results aligned with the optimal recommendation from the random forest regression model, which indicated that AZ91-0.16 wt% graphene composites exhibited good strain-hardening capacity, suggesting good sample ductility (values exceeding 1). Furthermore, the output was identical across all samples, and all outcomes were classified as TP. This consistency can be linked to the high ACC of the ML model.
4 Conclusion
This study employed a random forest ML model to examine the mechanical properties and fractography prediction of the AZ91-graphene composites. The conclusions are as follows:
-
1.
The random forest regression model demonstrated a high coefficient of determination with low error rates in predicting mechanical properties. The random forest classification model also achieved near-perfect accuracy of approximately 1.0 in predicting fractographic examination results. The validation errors for the predicted mechanical properties were mostly below 10% of the actual values. Furthermore, for the prediction of fractographic examination, all data points were correctly classified into their respective categories.
-
2.
Based on the experimental validation of the mechanical properties, the optimized predictions from the random forest regression model did not exceed the values obtained experimentally, except for the UTS under the T6 and ECAP 2 Pass treatments. However, the strain-hardening capacity of the samples recommended by the ML model was higher than that of the experimental samples. The predictions of fractographic examination from the random forest classification model were also experimentally validated, showing consistent results with correct categorization and TP outcomes.
This study can serve as a reference or guide for researchers to explore new mechanical properties and conduct fractography examinations using ML to design metal composites. The study results further demonstrate that the ML approach can be an effective tool for designing metal composites in a more cost-efficient and time-saving manner.
Data availability
The data that has been used is confidential.
References
Kumar A, Kumar S, Mukhopadhyay NK. Introduction to magnesium alloy processing technology and development of low-cost stir casting process for magnesium alloy and its composites. J Magnes Alloys. 2018;6(3):245–54. https://doi.org/10.1016/j.jma.2018.05.006.
Gupta M, Sharon NML. Magnesium, magnesium alloys, and magnesium composites. Hoboken, New Jersey: John Wiley & Sons Inc; 2011.
Somekawa H. Review effect of alloying elements on fracture toughness and ductility in magnesium binary alloys; a review. Mater Trans. 2020;61(1):1–13. https://doi.org/10.2320/matertrans.MT-M2019185.
Chen W, et al. Advances in graphene reinforced metal matrix nanocomposites: mechanisms, processing, modelling, properties and applications. Nanotechnol Precis Eng. 2020;3(4):189–210. https://doi.org/10.1016/j.npe.2020.12.003.
Abbas A, Rajagopal V, Huang SJ. Magnesium metal matrix composites and their applications, In: Magnesium Alloys Structure and Properties, IntechOpen, 2021. [Online]. Available: www.intechopen.com
Kowalczyk K, Jabłońska MB, Tkocz M, Chulist R, Bednarczyk I, Rzychoń T. Effect of the number of passes on grain refinement, texture and properties of DC01 steel strip processed by the novel hybrid SPD method. Arch Civil Mech Eng. 2022. https://doi.org/10.1007/s43452-022-00432-6.
Gere JM, Goodno BJ. Mechanics of Materials. 2011.
Fernández DM, Rodríguez-Prieto A, Camacho AM. Prediction of the bilinear stress-strain curve of aluminum alloys using artificial intelligence and big data. Metals (Basel). 2020;10(7):1–29. https://doi.org/10.3390/met10070904.
JR. D. G. R. William D. Callister, Materials Science and Engineering An Introduction, 9E ed. Wiley, 2014.
Kordijazi A, Zhao T, Zhang J, Alrfou K, Rohatgi P. A review of application of machine learning in design, synthesis, and characterization of metal matrix composites: current status and emerging applications. JOM. 2021;73(7):2060–74. https://doi.org/10.1007/s11837-021-04701-2.
Huang S-J, Adityawardhana Y, Sanjaya J. Predicting mechanical properties of magnesium matrix composites with regression models by machine learning. J Compos Sci. 2023;7(9): 347. https://doi.org/10.3390/jcs7090347.
Huang SJ, Mose MP, Kannaiyan S. A study of the mechanical properties of AZ61 magnesium composite after equal channel angular processing in conjunction with machine learning. Mater Today Commun. 2022. https://doi.org/10.1016/j.mtcomm.2022.104707.
Shanmugasundar G, Vanitha M, Čep R, Kumar V, Kalita K, Ramachandran M. A comparative study of linear, random forest and adaboost regressions for modeling non-traditional machining. Processes. 2021. https://doi.org/10.3390/pr9112015.
Kwak S, et al. Machine learning prediction of the mechanical properties of γ-TiAl alloys produced using random forest regression model. J Mater Res Technol. 2022;18:520–30. https://doi.org/10.1016/j.jmrt.2022.02.108.
Zhao G, et al. Machine-learning-assisted multiscale modeling strategy for predicting mechanical properties of carbon fiber reinforced polymers. Compos Sci Technol. 2024. https://doi.org/10.1016/j.compscitech.2024.110455.
Dong S, Wang Y, Li J, Li Y, Wang L, Zhang J. Machine learning aided prediction and design for the mechanical properties of magnesium alloys. Metals Mater Int. 2024;30(3):593–606. https://doi.org/10.1007/s12540-023-01531-6.
Biau G, Scornet E. A random forest guided tour. TEST. 2016;25(2):197–227. https://doi.org/10.1007/s11749-016-0481-7.
Speiser JL, Miller ME, Tooze J, Ip E. A comparison of random forest variable selection methods for classification prediction modeling. Expert Syst Appl. 2019;134:93–101. https://doi.org/10.1016/j.eswa.2019.05.028.
Ahmad MW, Reynolds J, Rezgui Y. Predictive modelling for solar thermal energy systems: a comparison of support vector regression, random forest, extra trees and regression trees. J Clean Prod. 2018;203:810–21. https://doi.org/10.1016/j.jclepro.2018.08.207.
Bahl A, et al. Recursive feature elimination in random forest classification supports nanomaterial grouping. NanoImpact. 2019. https://doi.org/10.1016/j.impact.2019.100179.
Rahman J, Ahmed KS, Khan NI, Islam K, Mangalathu S. Data-driven shear strength prediction of steel fiber reinforced concrete beams using machine learning approach. Eng Struct. 2021. https://doi.org/10.1016/j.engstruct.2020.111743.
Huang S-J, Adityawardhana Y, Kannaiyan S. Enhancement strength of AZ91 magnesium alloy composites reinforced with graphene by T6 heat treatment and equal channel angular pressing. Arch Civil Mech Eng. 2024;24(4): 235. https://doi.org/10.1007/s43452-024-01048-8.
Rajput R, Raut A, Setti SG. Prediction of mechanical properties of aluminium metal matrix hybrid composites synthesized using stir casting process by machine learning. Mater Today Proc. 2022. https://doi.org/10.1016/j.matpr.2022.04.316.
Chicco Corresp D, Warrens MJ, Jurman G, Chicco D.The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE, and RMSE in regression analysis evaluation analysis evaluation 4. 2021.
M H, M.N. S. A review on evaluation metrics for data classification evaluations. Int J Data Min Knowledge Manag Process. 2015;5(2):01–11. https://doi.org/10.5121/ijdkp.2015.5201.
Nurunnisha GA, Rohmattulah A, Maulansyah MR, Sinaga O, Maulansyah R. Analysis of consumer acceptance factors against fintech at Bandung Smes-palarch’s. [Online]. Available: https://www.researchgate.net/publication/356640628
Díaz E, Spagnoli G. A super-learner machine learning model for a global prediction of compression index in clays. Appl Clay Sci. 2024. https://doi.org/10.1016/j.clay.2023.107239.
Li Q, Wang X, Zhao L, Xu L, Han Y. Validation and improvement in metallic material tensile models for small punch tests. J Mater Sci. 2023;58(26):10832–52. https://doi.org/10.1007/s10853-023-08695-x.
Sagar PS, Alomar EA, Mkaouer MW, Ouni A, Newman CD. Comparing commit messages and source code metrics for the prediction refactoring activities. Algorithms. 2021. https://doi.org/10.3390/a14100289.
Selvam JDR, Dinaharan I, Rai RS. Matrix and reinforcement materials for metal matrix composites, in Encyclopedia of Materials: Composites, vol. 2, Amsterdam, The Netherlands: Elsevier, 2021;615–639. https://doi.org/10.1016/B978-0-12-803581-8.11890-9.
Zayed EM, Shazly M, El-Sabbagh A, El-Mahallawy NA. Deformation behavior and properties of severe plastic deformation techniques for bulk materials: a review. Heliyon. 2023. https://doi.org/10.1016/j.heliyon.2023.e16700.
Huang S-J, Sanjaya J, Kannaiyan S, Adityawardhana Y. Effect of heat treatment and severe plastic deformation on the mechanical properties of graphene-reinforced AM60B magnesium alloys. Mater Today Commun. 2025. https://doi.org/10.1016/j.mtcomm.2025.112299.
Huang SJ, Subramani M, Borodianskiy K, Immanuel PN, Chiang CC. Effect of equal channel angular pressing on the mechanical properties of homogenized hybrid AZ61 magnesium composites. Mater Today Commun. 2023. https://doi.org/10.1016/j.mtcomm.2022.104974.
Huang S, et al. The impact of graphene on the mechanical properties, corrosion behavior, and biocompatibility of an Mg–Ca alloy. J Am Ceram Soc. 2024. https://doi.org/10.1111/jace.20091.
Huang SJ, Ali AN. Experimental investigations of effects of SiC contents and severe plastic deformation on the microstructure and mechanical properties of SiCp/AZ61 magnesium metal matrix composites. J Mater Process Technol. 2019;272:28–39. https://doi.org/10.1016/j.jmatprotec.2019.05.002.
Sahoo PS, Mahapatra MM, Vundavilli PR, Sabat RK, Sirohi S, Kumar S. Investigation of severe plastic deformation effects on magnesium RZ5 alloy sheets using a modified multi-pass equal channel angular pressing (ECAP) technique. Materials. 2023. https://doi.org/10.3390/ma16145158.
Abbas A, Huang SJ. Investigation of severe plastic deformation effects on microstructure and mechanical properties of WS2/AZ91 magnesium metal matrix composites. Mater Sci Eng A. 2020. https://doi.org/10.1016/j.msea.2020.139211.
Huang SJ, Subramani M, Borodianskiy K. Strength and ductility enhancement of AZ61/Al2O3/SiC hybrid composite by ECAP processing. Mater Today Commun. 2022. https://doi.org/10.1016/j.mtcomm.2022.103261.
Malard LM, Pimenta MA, Dresselhaus G, Dresselhaus MS. Raman spectroscopy in graphene. Phys Rep. 2009;473(5–6):51–87. https://doi.org/10.1016/j.physrep.2009.02.003.
Wu J, Shen C, Zhou X, Wang X, Zhang L. Preparing high-strength and osteogenesis-induced Mg-Gd alloy with ultra-fine microstructure by equal channel angular pressing. Mater Res Express. 2023. https://doi.org/10.1088/2053-1591/acc0e0.
Huang S-J, Wu S-Y, Subramani M. Effect of zinc and severe plastic deformation on mechanical properties of AZ61 magnesium alloy. Materials. 2024. https://doi.org/10.3390/ma17071678.
Huang SJ, Abbas A, Ballóková B. Effect of CNT on microstructure, dry sliding wear and compressive mechanical properties of AZ61 magnesium alloy. J Mater Res Technol. 2019;8(5):4273–86. https://doi.org/10.1016/j.jmrt.2019.07.037.
Yang H, et al. Microstructures and the improved mechanical properties of AZ91 alloy by incorporating Ti-6Al-4V particles. J Mater Res Technol. 2023;26:7340–53. https://doi.org/10.1016/j.jmrt.2023.09.091.
Chiu C, Chang HH. Al0.5cocrfeni2 high entropy alloy particle reinforced az91 magnesium alloy-based composite processed by spark plasma sintering. Materials. 2021. https://doi.org/10.3390/ma14216520.
Singh LK, Bhadauria A, Laha T. Comparing the strengthening efficiency of multiwalled carbon nanotubes and graphene nanoplatelets in aluminum matrix. Powder Technol. 2019;356:1059–76. https://doi.org/10.1016/j.powtec.2019.09.026.
Xiong B, et al. Strengthening mechanisms in graphene reinforced Nb/Nb5Si3 composite. J Alloys Compd. 2024. https://doi.org/10.1016/j.jallcom.2023.172600.
Abbas A, Huang SJ. ECAP effects on microstructure and mechanical behavior of annealed WS2/AZ91 metal matrix composite. J Alloys Compd. 2020. https://doi.org/10.1016/j.jallcom.2020.155466.
Vijayananth K, Ponnusamy V, Kumar N, Sinnaeruvadi K. Effect of graphene on microstructure, strain hardening and corrosion behaviour of dual phase Mg-Li matrix processed through liquid metallurgy route. Proc Inst Mech Eng Part B J Eng Manuf. 2024. https://doi.org/10.1177/09544054241272883.
Gludovatz B, et al. Exceptional damage-tolerance of a medium-entropy alloy CrCoNi at cryogenic temperatures. Nat Commun. 2016. https://doi.org/10.1038/ncomms10602.
Acknowledgements
The authors extend their appreciation to the National Science and Technology Council, Taiwan, for their financial support in the form of project grant number NSTC 111-2221-E-011-096-MY3.
Funding
Open access funding provided by National Taiwan University of Science and Technology. This study was supported by National Science and Technology Council, 111-2221-E-011-096-MY3.
Author information
Authors and Affiliations
Contributions
S.-J. H.: Supervision, Funding acquisition, visualization, and Writing—review and editing; Y.A.: Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Software, Writing—original draft, Writing-review and editing.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to infuence the work reported in this paper.
Ethical approval
This article does not contain any studies with human participants or animals performed by any of the authors.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Huang, SJ., Adityawardhana, Y. Prediction of mechanical properties and fractography examination of AZ91 magnesium composites reinforced with graphene using a random forest machine learning model: experimental validation. Arch. Civ. Mech. Eng. 25, 259 (2025). https://doi.org/10.1007/s43452-025-01308-1
Received:
Revised:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1007/s43452-025-01308-1




















