# Predicting Software Cohesion Metrics with Machine Learning Techniques
## 6 Conclusions  
In the study, the cohesion value, which is one of the most important criteria for evaluating software quality, was predicted by RF, KNN, REPTree, SVM, MLP, and LR machine learning techniques. The dataset was produced using the tool during the study process. It was created by using the number of methods; the number of attributes; and the LCOM2, TCC, LCC, and LSCC metric values belonging to 1189 classes of Dataset#1 and 1237 classes of Dataset#2. There are many tools available and used in the literature to obtain software cohesion value. These tools calculate the cohesion value in different ways. Class design should be changed according to the obtained cohesion value. In general, the methods in the class and the structural relations of the attributes with each other are considered to be the measurement techniques. In this study, the class cohesion value was predicted quickly, easily, and practically. The experiment was based on the number of methods and the number of attributes in the class. According to these two values, the cohesion value of the class was estimated. As the cohesion value, LCOM2, TCC, LCC, and LSCC metrics, which measure in different ways and have different properties, were chosen within the scope of the study. To the best of our knowledge, there is no study in the literature that predicts the cohesion metric with regression analysis by using machine learning techniques.  
The obtained results differed according to the cohesion criterion used. The LCOM2 metric is not a normalized metric. Outlier, extreme value analysis, and normalization were performed on both Dataset#1 and Dataset#2. All the results obtained were provided separately. According to the obtained results, for the LCOM2 and TCC metrics, the KNN algorithm provided the best results, and for LCC and LSCC metrics, the REPTree algorithm provided the best results. However, for all metrics, RF, REPTree, and KNN had close performances to each other, and therefore any of the RF, REPTree, and KNN techniques can be used for software cohesion metrics prediction.  
The study was limited to a total of 1189 (Dataset#1) + 1237 (Dataset#2) classes for TCC, LCC, and LSCC metrics, and 1052 (Dataset#1) + 1147 (Dataset#2) classes remaining after outlier and extreme value analysis in the LCOM2 metric. We aim to increase the class number in future work and to increase the closeness of the estimated value obtained to the actual value by including classes belonging different domains. In addition, the same study can be conducted by choosing different cohesion metrics.  
Conceptualization, E.N.H.K. and T.E.A.; methodology, T.E.A.; software, E.N.H.K.; formal analysis, E.N.H.K.; investigation, E.N.H.K. and T.E.A.; resources, E.N.H.K. and T.E.A.; data curation, E.N.H.K.; writing--original draft preparation, E.N.H.K. and T.E.A.; writing--review and editing, T.E.A.; visualization, E.N.H.K. and T.E.A.; supervision, T.E.A.; project administration, T.E.A.; funding acquisition, not applicable. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
Data Availability Statement: The data presented in this study are available on request from the corresponding author without undue reservation.  
The authors declare no conflict of interest.