Towards Predicting Architectural Design Patterns: A Machine Learning Approach
Abstract
:1. Introduction
- Transformability, where SA can be implemented by SC;
- Traceability, where SA and its elements can be identified by SC and vice versa;
- Consistency, where SA and SC are consistent with each other—that is, changes made to SA should be reflected on SC and vice versa;
- Interplay, where the quality of SA affects the SC and vice versa;
- Recovery, where information about SA (and its elements) can be obtained by SC.
- Representation. Based on the target goal, what should be the format and representation of the data and knowledge?
- Characteristics of learning process. Based on the characteristics of the data, knowledge, and environment, should the learning process be supervised or unsupervised or query or reinforcement learning?
- Properties of training data and domain theories. Collecting enough data to achieve satisfactory results. The learning process should consider the quality and correctness of the data.
- Target function output. Depending on the output value, the learning process can be binary classification, multi-value classification, and regression.
- Theoretical underpinnings and practical considerations. How should the output from the learning process be interpreted?
- Machine-learning-based approach for detecting software architecture, namely, MVP and MVVM from source code metrics.
- A dataset consisting of 5973 Java projects retrieved from GitHub.
- The analysis of retrieved dataset using nine popular machine learning models. The dataset and code are freely available for the research community (https://github.com/Rhtyme/architectural-design-patterns-prediction, accessed on 29 August 2022).
- Establishing a set of important source code metrics that can be used to detect MVVM and MVP architectural patterns using machine learning.
2. Background
2.1. Model–View–Presenter Architecture
- (A)
- Model—represents the data layer that should be displayed and contains business logic;
- (B)
- View—represents user interface, displays the passed data, delegates user-commands to controller layer and does not hold any logic;
- (C)
- Presenter—acts as a controller between model and view; requests data from model layer and passes the received data to View; and handles user-interaction events from the View layer accordingly.
2.2. Model–View–ViewModel Architecture
- (A)
- Model layer—represents domain or data layer which represents the content;
- (B)
- View layer—responsible for user interface and, compared to MVP, separated by ViewModel layer (which can be considered as an alternative to the Presenter layer of MVP) more, and the interaction between View and ViewModel is handled through so-called data bindings that trigger an event when data are changed or on user input;
- (C)
- ViewModel layer acts as a middle-ware between View and Model, handles user-interactions that it receives by View through binders, and provides a model via data-state whose changes can be observed.
3. Related Work
3.1. Architectural Patterns
3.2. Design Patterns
4. Methodology
- (A)
- Data Extraction;
- (B)
- Data Preprocessing;
- (C)
- Machine Learning Models;
- (D)
- Performance Evaluation.
4.1. Data Extraction
- MVP architecture: language:Java Android MVP
- MVVM architecture: language:Java Android MVVM
- (A)
- The limit on the number of requests per minute;
- (B)
- The maximum number of repositories retrieved per query, which is fixed to 1000.
4.2. Data Preprocessing and Feature Selection
4.3. Machine Learning Models
4.4. Performance Metrics
5. Results and Discussions
- RQ1:
- In the context of machine learning, what are the contributing metrics that enhance the prediction of architectural design patterns?
- RQ2:
- What could be the interpretation of the feature importance concept in the domain of software design?
- RQ3:
- What is the performance of machine learning models in detection of MVVM and MVP architectural patterns in GitHub repositories?
- RQ4:
- What is the complexity and performance of the proposed approach in this paper compared with state-of-the-art?
5.1. RQ1: About the Selection of Important Features for Predicting Architectural Design Patterns Using Machine Learning Models
5.2. RQ2: About Interpretation of ML Models’ Feature Importance in the Context of Software Engineering
5.3. RQ3: About Accuracy of Machine Learning in Detecting MVVM and MVP
5.4. RQ4: Comparison with the State-of-the-Art
6. Limitations and Threats to Validity
6.1. External Validity
6.2. Reliability Validity
6.3. Limitations
7. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Appendix A
Feature Name | Description |
---|---|
class_cbo | Coupling between objects—the number of dependencies of the class |
class_cboModified | Modified coupling between objects—this metric is about the number of dependencies of the class, but it also considers the dependencies from the class as being both the reference the type makes to others and the references that it receives from other types |
class_fanin | The number of references from other classes to a particular class, i.e., the number of classes that use this class |
class_fanout | The number of references from a particular class, i.e., the number of classes referenced by a particular class |
class_wmc | Weight Method Class or McCabe’s complexity—the number of branch instructions in a class |
class_dit | Depth Inheritance Tree—the number of parent classes that a class has |
class_noc | Number of Children—the number of classes that inherit a particular class |
class_rfc | Response for a Class—the number of unique method executions in a class |
class_lcom | Lack of Cohesion of Methods—the number of unconnected method pairs in a class representing independent parts having no cohesion or, in other words, the measure of how well the methods of a class are related to each other |
class_lcom | Modified Lack of Cohesion of Methods—this metric just normalizes the LCOM value within 0 and 1 |
class_tcc | Tight Class Cohesion—the cohesion of a class, normalized within 0 and 1. This metric measures the cohesion of a class by counting the direct connections between visible methods |
class_lcc | Loose Class Cohesion—the approach of this metric is similar to TCC, but it also considers indirect connections between visible classes |
class_totalMethodsQty | The number of methods in a class |
class_staticMethodsQty | The number of static methods in a class |
class_publicMethodsQty | The number of public methods in a class |
class_privateMethodsQty | The number of private methods in a class |
class_protectedMethodsQty | The number of protected methods in a class |
class_defaultMethodsQty | The number of methods with default modifier in a class |
class_visibleMethodsQty | The number of visible methods in a class |
class_abstractMethodsQty | The number of abstract methods in a class |
class_finalMethodsQty | The number of final methods in a class |
class_synchronizedMethodsQty | The number of synchronized methods in a class |
class_totalFieldsQty | The number of fields in a class |
class_staticFieldsQty | The number of static fields in a class |
class_publicFieldsQty | The number of public fields in a class |
class_privateFieldsQty | The number of private fields in a class |
class_protectedFieldsQty | The number of protected fields in a class |
class_defaultFieldsQty | The number of fields with default modifier in a class |
class_finalFieldsQty | The number of final fields in a class |
class_synchronizedFieldsQty | The number of synchronized fields in a class |
class_nosi | Number of static invocations—the number of static methods executions |
class_loc | Lines of code ignoring the empty lines and comments |
class_returnQty | The number of return statements |
class_loopQty | The number of loops |
class_comparisonsQty | The number of comparisons |
class_tryCatchQty | The number of try-catch statements |
class_parenthesizedExpsQty | The number of expressions inside parentheses |
class_stringLiteralsQty | The number of string literals including repeated literals |
class_numbersQty | The number of number literals |
class_assignmentsQty | The number of value assignments to an object |
class_mathOperationsQty | The number of math operations (i.e., addition, division, multiplication, etc.) |
class_variablesQty | The number of variables within a class |
class_maxNestedBlocksQty | The highest number of blocks nested together |
class_anonymousClassesQty | The number of declared anonymous classes |
class_innerClassesQty | The number of inner classes |
class_lambdasQty | The number of lambda expressions |
class_uniqueWordsQty | The number of unique words within a class |
class_modifiers | The number of declared modifiers (i.e., public, private, protected, etc.) |
class_logStatementsQty | The number of log statements |
field_usage | The number of field usages |
method_constructor | The number of constructor methods |
method_line | The number of method lines |
method_cbo | Coupling between objects—the number of dependencies a method has |
method_cboModified | Modified coupling between objects—this metric is about the number of dependencies of a method, but it also considers the dependencies from the method as being both the reference to others and the references that it receives from others |
method_fanin | The number of cases that referenced to a method |
method_fanout | The number of cases referenced from a method |
method_wmc | Weight Method Class or McCabe’s complexity—the number of branch instructions in a method |
method_rfc | Response for a Class—the number of unique method executions in a method |
method_loc | The number of code lines of a method ignoring empty lines and comments |
method_returnsQty | The number of return statements in a method |
method_variablesQty | The number of variables in a method |
method_parametersQty | The number of parameters a method accepts |
method_methodsInvokedQty | The number of all direct invocations of methods |
method_methodsInvokedLocalQty | The number of all direct invocations of methods of the same class |
method_methodsInvokedIndirectLocalQty | The number of all indirect invocations of methods of the same class |
method_loopQty | The number of loops in a method |
method_comparisonsQty | The number of comparisons in a method |
method_tryCatchQty | The number of try-catch statements in a method |
method_parenthesizedExpsQty | The number of expressions inside parentheses in a method |
method_stringLiteralsQty | The number of string literals including repeated literals in a method |
method_numbersQty | The number of number literals in a method |
method_assignmentsQty | The number of value assignments to an object in a method |
method_mathOperationsQty | The number of math operations (i.e., addition, division, multiplication, etc.) in a method |
method_maxNestedBlocksQty | The highest number of blocks nested together in a method |
method_anonymousClassesQty | The number of declared anonymous classes in a method |
method_innerClassesQty | The number of inner classes in a method |
method_lambdasQty | The number of lambda expressions in a method |
method_uniqueWordsQty | The number of unique words within a method |
method_modifiers | The number of declared modifiers (i.e., public, private, protected, etc.) in a method |
method_logStatementsQty | The number of log statements in a method |
method_hasJavaDoc | Whether a method has JavaDoc |
variable_usage | The number of variable usages |
method_innerClassesQty | The number of inner classes within a method |
class_nosi | The number of static method invocations within a class |
References
- Garlan, D.; Bass, L.; Stafford, J.; Nord, R.; Ivers, J.; Little, R. Documenting software architectures: Views and beyond. In Proceedings of the 25th International Conference on Software Engineering, Portland, OR, USA, 3–10 May 2003. [Google Scholar]
- Bosch, J.; Molin, P. Software architecture design: Evaluation and transformation. In Proceedings of the IEEE Conference and Workshop on Engineering of Computer-Based Systems, Nashville, TN, USA, 7–12 March 1999; pp. 4–10. [Google Scholar] [CrossRef] [Green Version]
- Buschmann, F.; Henney, K.; Schmidt, D.C. Pattern-Oriented Software Architecture, on Patterns and Pattern Languages; John Wiley & Sons: Hoboken, NJ, USA, 2007; Volume 5. [Google Scholar]
- Shaw, M.; Garlan, D. Characteristics of Higher Level Languages for Software Architecture; Technical Report CMU/SEI-94-TR-023; Software Engineering Institute, Carnegie Mellon University: Pittsburgh, PA, USA, 1994. [Google Scholar]
- Fairbanks, G. Just Enough Software Architecture: A Risk-Driven Approach; Marshall & Brainerd: Brainerd, MN, USA, 2010. [Google Scholar]
- Murta, L.G.; van der Hoek, A.; Werner, C.M. Continuous and automated evolution of architecture-to-implementation traceability links. Autom. Softw. Eng. 2008, 15, 75–107. [Google Scholar] [CrossRef] [Green Version]
- Tian, F.; Liang, P.; Babar, M.A. Relationships between software architecture and source code in practice: An exploratory survey and interview. Inf. Softw. Technol. 2022, 141, 106705. [Google Scholar] [CrossRef]
- Sahlabadi, M.; Muniyandi, R.C.; Shukur, Z.; Qamar, F. Lightweight Software Architecture Evaluation for Industry: A Comprehensive Review. Sensors 2022, 22, 1252. [Google Scholar] [CrossRef] [PubMed]
- Kazman, R.; Bass, L.; Klein, M.; Lattanze, T.; Northrop, L. A basis for analyzing software architecture analysis methods. Softw. Qual. J. 2005, 13, 329–355. [Google Scholar] [CrossRef]
- Meinke, K.; Bennaceur, A. Machine Learning for Software Engineering: Models, Methods, and Applications. In Proceedings of the 2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion), Gothenburg, Sweden, 27 May–3 June 2018; pp. 548–549. [Google Scholar]
- Zhang, D.; Tsai, J.J. Machine learning and software engineering. Softw. Qual. J. 2003, 11, 87–119. [Google Scholar] [CrossRef]
- Bass, L.; Clements, P.; Kazman, R. Software Architecture in Practice; Addison-Wesley Professional: Boston, MA, USA, 2003. [Google Scholar]
- Garlan, D. Software architecture: A roadmap. In Proceedings of the Conference on the Future of Software Engineering, Limerick, Ireland, 4–11 June 2000; pp. 91–101. [Google Scholar]
- Documentation. Android Development. Available online: https://developer.android.com/docs (accessed on 24 March 2022).
- Google I/O 2019: Empowering Developers to Build the Best Experiences on Android + Play. Available online: https://android-developers.googleblog.com/2019/05/google-io-2019-empowering-developers-to-build-experiences-on-Android-Play.html (accessed on 16 September 2022).
- Dahse, J.; Holz, T. Simulation of Built-in PHP Features for Precise Static Code Analysis. NDSS 2014, 14, 23–26. [Google Scholar]
- Ebad, S.A.; Ahmed, M.A. Measuring stability of object-oriented software architectures. IET Softw. 2015, 9, 76–82. [Google Scholar] [CrossRef]
- Chekhaba, C.; Rebatchi, H.; ElBoussaidi, G.; Moha, N.; Kpodjedo, S. Coach: Classification-Based Architectural Patterns Detection in Android Apps. In Proceedings of the 36th Annual ACM Symposium on Applied Computing, Online, 22–26 March 2021; pp. 1429–1438. [Google Scholar] [CrossRef]
- Daoudi, A.; ElBoussaidi, G.; Moha, N.; Kpodjedo, S. An Exploratory Study of MVC-Based Architectural Patterns in Android Apps. In Proceedings of the SAC ’19: The 34th ACM/SIGAPP Symposium on Applied Computing, Limassol, Cyprus, 8–12 April 2019; Association for Computing Machinery: New York, NY, USA, 2019; pp. 1711–1720. [Google Scholar] [CrossRef]
- Dobrean, D.; Diosan, L. A Hybrid Approach to MVC Architectural Layers Analysis. In Proceedings of the ENASE, Online, 26–27 April 2021; pp. 36–46. [Google Scholar]
- github. GitHub; GitHub: San Francisco, CA, USA, 2020. [Google Scholar]
- Humeniuk, V. Android Architecture Comparison: MVP vs. VIPER. 2019. Available online: http://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1291671&dswid=-8436 (accessed on 29 August 2022).
- Potel, M. MVP: Model-View-Presenter the Taligent Programming Model for C++ and Java; Taligent Inc.: Cupertino, CA, USA, 1996; Volume 20. [Google Scholar]
- Gossman, J. Introduction to Model/View/ViewModel Pattern for Building WPF apps. 2005. Available online: https://learn.microsoft.com/en-us/archive/blogs/johngossman/introduction-to-modelviewviewmodel-pattern-for-building-wpf-apps (accessed on 29 August 2022).
- Gamma, E. Design Patterns: Elements of Reusable Object-Oriented Software; Pearson Education: New Delhi, India, 1995. [Google Scholar]
- Uchiyama, S.; Washizaki, H.; Fukazawa, Y.; Kubo, A. Design pattern detection using software metrics and machine learning. In Proceedings of the First international Workshop on Model-Driven Software Migration (MDSM 2011), Oldenburg, Germany, 1–4 March 2011; p. 38. [Google Scholar]
- Zanoni, M.; Arcelli Fontana, F.; Stella, F. On applying machine learning techniques for design pattern detection. J. Syst. Softw. 2015, 103, 102–117. [Google Scholar] [CrossRef]
- Thaller, H. Towards Deep Learning Driven Design Pattern Detection/submitted by Hannes Thaller. Ph.D. Thesis, Universität Linz, Linz, Austria, 2016. [Google Scholar]
- Nazar, N.; Aleti, A.; Zheng, Y. Feature-based software design pattern detection. J. Syst. Softw. 2022, 185, 111179. [Google Scholar] [CrossRef]
- Mikolov, T.; Chen, K.; Corrado, G.; Dean, J. Efficient estimation of word representations in vector space. arXiv 2013, arXiv:1301.3781. [Google Scholar]
- Github Rest Api. Available online: https://docs.github.com/en/rest (accessed on 24 March 2022).
- Aniche, M. Java Code Metrics Calculator (CK). 2015. Available online: https://github.com/mauricioaniche/ck/ (accessed on 29 August 2022).
- Crawford, M.; Khoshgoftaar, T.M.; Prusa, J.D.; Richter, A.N.; Al Najada, H. Survey of review spam detection using machine learning techniques. J. Big Data 2015, 2, 23. [Google Scholar] [CrossRef] [Green Version]
- Jacob, S.S.; Vijayakumar, R. Sentimental analysis over twitter data using clustering based machine learning algorithm. J. Ambient. Intell. Humaniz. Comput. 2021. [Google Scholar] [CrossRef]
- Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning: Data Mining, Inference, and Prediction; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
- Rish, I. An empirical study of the naive Bayes classifier. In Proceedings of the IJCAI 2001 Workshop on Empirical Methods in Artificial Intelligence, Seattle, WA, USA, 4–10 August 2001; pp. 41–46. [Google Scholar]
- Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
- Dorogush, A.V.; Ershov, V.; Gulin, A. CatBoost: Gradient boosting with categorical features support. arXiv 2018, arXiv:1810.11363. [Google Scholar]
- Nori, H.; Jenkins, S.; Koch, P.; Caruana, R. InterpretML: A Unified Framework for Machine Learning Interpretability. arXiv 2019, arXiv:1909.09223. [Google Scholar]
- Magán-Carrión, R.; Urda, D.; Díaz-Cano, I.; Dorronsoro, B. Towards a reliable comparison and evaluation of network intrusion detection systems based on machine learning approaches. Appl. Sci. 2020, 10, 1775. [Google Scholar] [CrossRef] [Green Version]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- He, H.; Ma, Y. Imbalanced Learning: Foundations, Algorithms, and Applications; John Wiley & Sons: Hoboken, NJ, USA, 2013. [Google Scholar]
- Perry, D.E.; Wolf, A.L. Foundations for the Study of Software Architecture. SIGSOFT Softw. Eng. Notes 1992, 17, 40–52. [Google Scholar] [CrossRef] [Green Version]
- Medvidovic, N.; Taylor, R.N. Software architecture: Foundations, theory, and practice. In Proceedings of the 2010 ACM/IEEE 32nd International Conference on Software Engineering, Cape Town, South Africa, 1–8 May 2010; Volume 2, pp. 471–472. [Google Scholar]
- Lenhard, J.; Blom, M.; Herold, S. Exploring the suitability of source code metrics for indicating architectural inconsistencies. Softw. Qual. J. 2019, 27, 241–274. [Google Scholar] [CrossRef] [Green Version]
- Holvitie, J.; Licorish, S.A.; Spínola, R.O.; Hyrynsalmi, S.; MacDonell, S.G.; Mendes, T.S.; Buchan, J.; Leppänen, V. Technical debt and agile software development practices and processes: An industry practitioner survey. Inf. Softw. Technol. 2018, 96, 141–160. [Google Scholar] [CrossRef]
- Shaukat, K.; Luo, S.; Chen, S.; Liu, D. Cyber threat detection using machine learning techniques: A performance evaluation perspective. In Proceedings of the 2020 International Conference on Cyber Warfare and Security (ICCWS), Online, 20–21 October 2020; pp. 1–6. [Google Scholar]
- Ahmad, M.A.; Eckert, C.; Teredesai, A. Interpretable machine learning in healthcare. In Proceedings of the 2018 ACM International Conference on Bioinformatics, Computational Biology, and Health Informatics, Washington, DC, USA, 29 August–1 September 2018; pp. 559–560. [Google Scholar]
- Nayak, S.R.; Nayak, J.; Sinha, U.; Arora, V.; Ghosh, U.; Satapathy, S.C. An automated lightweight deep neural network for diagnosis of COVID-19 from chest X-ray images. Arab. J. Sci. Eng. 2021. [Google Scholar] [CrossRef]
- Patron, G.; Leon, D.; Lopez, E.; Hernandez, G. An Interpretable Automated Machine Learning Credit Risk Model. In Proceedings of the Workshop on Engineering Applications, Bogota, Colombia, 7–10 October 2020; pp. 16–23. [Google Scholar]
- Chawla, N.V.; Bowyer, K.W.; Hall, L.O.; Kegelmeyer, W.P. SMOTE: Synthetic minority over-sampling technique. J. Artif. Intell. Res. 2002, 16, 321–357. [Google Scholar] [CrossRef]
- Douzas, G.; Bacao, F. Effective data generation for imbalanced learning using conditional generative adversarial networks. Expert Syst. Appl. 2018, 91, 464–471. [Google Scholar] [CrossRef]
- Dlamini, G.; Fahim, M. DGM: A data generative model to improve minority class presence in anomaly detection domain. Neural Comput. Appl. 2021, 33, 13635–13646. [Google Scholar] [CrossRef]
- Gamma, E.; Helm, R.; Johnson, R.; Vlissides, J. Design patterns: Abstraction and reuse of object-oriented design. In Proceedings of the European Conference on Object-Oriented Programming, Kaiserslautern, Germany, 26–20 July 1993; pp. 406–431. [Google Scholar]
Parameter | Value |
---|---|
Number of hidden layers | 3 |
Activation function | rectified linear unit function |
Optimizer | adam |
Learning rate | 0.0001 |
Batch size | 200 |
Epochs | 200 |
Rank | RF | CB | EBM |
---|---|---|---|
1 | class_defaultMethodsQty | class_defaultMethodsQty | class_defaultMethodsQty |
2 | method_cbo | class_dit | method_returnsQty |
3 | method_returnsQty | method_returnsQty | class_dit |
4 | class_dit | method_cbo | class_defaultFieldsQty |
5 | method_constructor | method_modifiers | method_cbo |
6 | method_modifiers | class_innerClassesQty | class_innerClassesQty |
7 | class_tcc | class_defaultFieldsQty | method_modifiers |
8 | class_lcc | class_anonymousClassesQty | class_noc |
9 | class_cbo | class_privateMethodsQty | class_lambdasQty |
10 | class_lcom | class_noc | method_constructor |
Feature Name | RF Rank | CB Rank | EBM Rank |
---|---|---|---|
method_comparisonsQty | 67 | 64 | 73 |
class_nosi | 72 | 63 | 71 |
class_comparisonsQty | 69 | 68 | 75 |
class_finalMethodsQty | 78 | 71 | 63 |
method_maxNestedBlocksQty | 71 | 65 | 77 |
class_loc | 73 | 72 | 76 |
method_logStatementsQty | 80 | 79 | 79 |
class_logStatementsQty | 79 | 80 | 80 |
method_innerClassesQty | 81 | 81 | 81 |
class_synchronizedFieldsQty | 82 | 82 | 82 |
Classifier | Precision | Recall | Accuracy | F1 Score | Cross-Validation F1 Score |
---|---|---|---|---|---|
LR | 0.82 | 0.82 | 0.82 | 0.82 | 0.82 ± 0.01 |
Naive Bayes | 0.56 | 0.60 | 0.60 | 0.52 | 0.50 ± 0.02 |
SVM | 0.83 | 0.83 | 0.83 | 0.83 | 0.82 ± 0.02 |
Decision Tree | 0.70 | 0.69 | 0.69 | 0.69 | 0.70 ± 0.01 |
Random Forest | 0.81 | 0.81 | 0.81 | 0.81 | 0.80 ± 0.01 |
Neural Network | 0.83 | 0.83 | 0.83 | 0.83 | 0.82 ± 0.01 |
k-NN | 0.78 | 0.78 | 0.78 | 0.78 | 0.77 ± 0.00 |
CB | 0.82 | 0.82 | 0.82 | 0.82 | 0.82 ± 0.01 |
EBM | 0.82 | 0.82 | 0.82 | 0.82 | 0.81 ± 0.02 |
Pattern | Rimaz [19] | Coach [18] | Ours | ||||||
---|---|---|---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | P | R | F1 | |
MVP | 0.55 | 0.17 | 0.22 | 0.73 | 0.45 | 0.56 | 0.86 | 0.94 | 0.83 |
MVVM | 0 | 0 | 0 | 0.97 | 0.51 | 0.67 | 0.86 | 0.94 | 0.83 |
None | 0.52 | 0.96 | 0.62 | 0.47 | 0.84 | 0.61 | 0 | 0 | 0 |
Classifier | Our Data | Coach Data [18] | Ours + Coach [18] | ||||||
---|---|---|---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | P | R | F1 | |
LR | 0.82 | 0.82 | 0.82 | 0.79 | 0.77 | 0.77 | 0.86 | 0.86 | 0.86 |
Naive Bayes | 0.56 | 0.60 | 0.60 | 0.25 | 0.31 | 0.26 | 0.46 | 0.52 | 0.45 |
SVM | 0.83 | 0.83 | 0.83 | 0.77 | 0.69 | 0.71 | 0.96 | 0.95 | 0.95 |
Decision Tree | 0.70 | 0.69 | 0.69 | 0.27 | 0.46 | 0.34 | 0.71 | 0.71 | 0.71 |
Random Forest | 0.81 | 0.81 | 0.81 | 0.58 | 0.53 | 0.47 | 0.90 | 0.90 | 0.90 |
CB/AdaBoost | 0.82 | 0.82 | 0.82 | 0.42 | 0.61 | 0.50 | 1.00 | 1.00 | 1.00 |
EBM | 0.82 | 0.82 | 0.82 | — | — | — | 0.81 | 0.81 | 0.81 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Komolov, S.; Dlamini, G.; Megha, S.; Mazzara, M. Towards Predicting Architectural Design Patterns: A Machine Learning Approach. Computers 2022, 11, 151. https://doi.org/10.3390/computers11100151
Komolov S, Dlamini G, Megha S, Mazzara M. Towards Predicting Architectural Design Patterns: A Machine Learning Approach. Computers. 2022; 11(10):151. https://doi.org/10.3390/computers11100151
Chicago/Turabian StyleKomolov, Sirojiddin, Gcinizwe Dlamini, Swati Megha, and Manuel Mazzara. 2022. "Towards Predicting Architectural Design Patterns: A Machine Learning Approach" Computers 11, no. 10: 151. https://doi.org/10.3390/computers11100151
APA StyleKomolov, S., Dlamini, G., Megha, S., & Mazzara, M. (2022). Towards Predicting Architectural Design Patterns: A Machine Learning Approach. Computers, 11(10), 151. https://doi.org/10.3390/computers11100151