mlsanityData to 14 Oct 2026

Predicting the Understandability of Computational Notebooks through Code Metrics Analysis

arXiv 2406.10989 ↗First posted 16 Jun 2024cs.SE cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Computational notebooks are the primary coding tools for data scientists, but their code quality remains understudied and often poor. Given the importance of maintainability and reusability, enhancing code understandability is essential. Traditional methods for assessing understandability typically rely on limited questionnaires or metadata like likes and votes, which may not reflect actual code clarity. To address this, we propose a novel approach that leverages user opinions from software repositories to assess the understandability of Jupyter notebooks. We conducted a case study using 542,051 Kaggle Jupyter notebooks compiled in the DistilKaggle dataset. To identify user comments related to code understandability, we used a fine-tuned DistilBERT transformer. We then introduced a new metric, i.e., User Opinion Code Understandability (UOCU), based on the number of relevant comments, their upvotes, and notebook views. UOCU proved significantly more effective than prior methods. We further enhanced it by combining UOCU with total upvotes in a hybrid approach. Using this improved metric, we collected 34 notebook-level metrics from 132,723 final notebooks and trained machine learning models to predict understandability. Our best model, a Random Forest classifier, achieved 89% accuracy in classifying the understandability level of notebook code. This work demonstrates the value of user opinion signals and notebook metrics in building scalable, accurate measures of code understandability.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 20 of its 87 references that are in the map. First posted on arXiv 16 Jun 2024.

Builds on

20 of 87 references.

References · 20

  1. 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
  2. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
  3. 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  5. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  6. 2018Consistent Individualized Feature Attribution for Tree Ensemblescited by 285
  7. 2023On the Design of AI-powered Code Assistants for Notebookscited by 28
  8. 2021Documentation Matters: Human-Centered AI System to Assist Data Science Code Documentation in Computational Notebookscited by 17
  9. 2019Better Code, Better Sharing:On the Need of Analyzing Jupyter Notebookscited by 13
  10. 2021KGTorrent: A Dataset of Python Jupyter Notebooks from Kagglecited by 10
  11. 2021Evaluating Code Readability and Legibility: An Examination of Human-centric Studiescited by 8
  12. 2022A Large-Scale Comparison of Python Code in Jupyter Notebooks and Scriptscited by 7
8 more
  1. 2021HAConvGNN: Hierarchical Attention Based Convolutional Graph Neural Network for Code Documentation Generation in Jupyter Notebookscited by 6
  2. 2021Restoring Execution Environments of Jupyter Notebookscited by 5
  3. 2022Bug Analysis in Jupyter Notebook Projects: An Empirical Studycited by 5
  4. 2021ReSplit: Improving the Structure of Jupyter Notebooks by Re-Splitting Their Cellscited by 3
  5. 2021Behind the Scenes: On the Relationship Between Developer Experience and Refactoringcited by 1
  6. 2022Understanding the Characteristics of Visual Contents in Open Source Issue Discussions: A Case Study of Jupyter Notebookcited by 1
  7. 2022Assessing the Quality of Computational Notebooks for a Frictionless Transition from Exploration to Productioncited by 1
  8. 2023Mining the Characteristics of Jupyter Notebooks in Data Science Projectscited by 1

Built on by

Not cited yet.