## 5 Conclusions  
In this study, the application of logarithmic and inverse tangent methods to preprocess the permeability data improved the accuracy of the permeability XGBoost prediction model. The LOG(PERM) demonstrated an improvement in the R\({}^{2}\) of the test set by 0.26 over PERM. Similarly, the Arctan(PERM) improved the R\({}^{2}\) of the test set by 0.19 over PERM. Additionally, the degree of training set fitting was reduced by 0.02 and 0.03, respectively, which attenuates overfitting to some extent.  
The K-means method has positive implications for the optimization of porosity and permeability XGBoost logging prediction models. The K-means data grouping method was applied to the data input to the machine learning model, which was divided into two groups. The R\({}^{2}\) was improved by 0.15 on average, and the MAE was reduced by 0.017 on average when compared with the ungrouped model. This resulted in an improvement in the model prediction ability and a closer alignment of the prediction results with the laboratory test data.  
The R\({}^{2}\) of the K-means grouped porosity model POR_0/POR_1 test set was 0.73 and 0.85, and the optimal feature combinations were [AC, CAL, CNL, DEN, SP, RLLS, PE, GR] and [CAL, CNL, SP, RLLS, PE, GR, RT]; the R\({}^{2}\) of the K-means grouped permeability model Arctan(PERM)_0/Arctan(PERM)_1 test set was 0.58 and 0.85, and the optimal feature combinations were [CAL, CNL, DEN, SP, RLLS, PE, GR, RT] and [CNL, SP, PE, GR, RT]. The accuracy of the single-well application was good relative to the porosity and permeability logging curves, and a full-well section prediction can be realized. Consequently, the K-means optimized porosity and permeability XGBoost model offers a novel approach and a reference point for the efficient and relatively accurate evaluation of porosity and permeability in the study area at a reduced cost. Furthermore, it provides a reference for K-means to combine with other machine learning methods to predict important parameters in the process of oil and gas field development, thereby expanding the scope of the applicability of the method.  
Figure 9: (**a**) Planar distribution of porosity in layer S13 in the study area; (**b**) planar distribution of permeability in layer S13 in the study area.  
**Author Contributions:** Conceptualization, [PERSON]; methodology, [PERSON]; software, [PERSON]; validation, N.F.; formal analysis, N.F.; investigation, [PERSON]; resources, A.J.; data curation, A.J.; writing--original draft preparation, J.Z.; writing--review and editing, [PERSON]; visualization, [PERSON]; supervision, A.J. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This work was funded by the Key R & D Plan of Shaanxi Province (key industrial innovation chain (Group)) \"Research, development and industrialization promotion of small-molecular recyclable self-cleaning fracturing fluid (Project No.2022 ZDLSF07-04)\".  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The raw data supporting the conclusions of this article will be made available by the authors on request.  
**Conflicts of Interest:** The authors declare no conflicts of interest.