A Flexible Cell Classification for ML Projects in Jupyter Notebooks
Preprint
Abstract
Jupyter Notebook is an interactive development environment commonly used for rapid experimentation of machine learning (ML) solutions. Describing the ML activities performed along code cells improves the readability and understanding of Notebooks. Manual annotation of code cells is time-consuming and error-prone. Therefore, tools have been developed that classify the cells of a notebook concerning the ML activity performed in them. However, the current tools are not flexible, as they work based on look-up tables that have been created, which map function calls of commonly used ML libraries to ML activities. These tables must be manually adjusted to account for new or changed libraries. This paper presents a more flexible approach to cell classification based on a hybrid classification approach that combines a rule-based and a decision tree classifier. We discuss the design rationales and describe the developed classifiers in detail. We implemented the new flexible cell classification approach in a tool called JupyLabel. Its evaluation and the obtained metric scores regarding precision, recall, and F1-score are discussed. Additionally, we compared JupyLabel with HeaderGen, an existing cell classification tool. We were able to show that the presented flexible cell classification approach outperforms this tool significantly.Keywords
All Related Versions
This publication has 11 references indexed in Scilit:
- Enhancing Comprehension and Navigation in Jupyter Notebooks with Static Analysis2023
- Workflow analysis of data science code in public GitHub repositoriesEmpirical Software Engineering, 2022
- Optimal ratio for data splittingStatistical Analysis and Data Mining: An ASA Data Science Journal, 2022
- KGTorrent: A Dataset of Python Jupyter Notebooks from Kaggle2021
- Code smell detection using multi-label classification approachSoftware Quality Journal, 2020
- Machine learning techniques for code smell detection: A systematic literature review and meta-analysisInformation and Software Technology, 2019
- Exploration and Explanation in Computational Notebooks2018
- Comparing and experimenting machine learning techniques for code smell detectionEmpirical Software Engineering, 2015
- Where's the science in software engineering?Ubiquity, 2014
- A Comparison of Decision Tree Ensemble Creation TechniquesIEEE Transactions on Pattern Analysis and Machine Intelligence, 2006