PeerJ Computer Science (Feb 2023)

Code4ML: a large-scale dataset of annotated Machine Learning code

  • Anastasia Drozdova,
  • Ekaterina Trofimova,
  • Polina Guseva,
  • Anna Scherbakova,
  • Andrey Ustyuzhanin

DOI
https://doi.org/10.7717/peerj-cs.1230
Journal volume & issue
Vol. 9
p. e1230

Abstract

Read online Read online

The use of program code as a data source is increasingly expanding among data scientists. The purpose of the usage varies from the semantic classification of code to the automatic generation of programs. However, the machine learning model application is somewhat limited without annotating the code snippets. To address the lack of annotated datasets, we present the Code4ML corpus. It contains code snippets, task summaries, competitions, and dataset descriptions publicly available from Kaggle—the leading platform for hosting data science competitions. The corpus consists of ~2.5 million snippets of ML code collected from ~100 thousand Jupyter notebooks. A representative fraction of the snippets is annotated by human assessors through a user-friendly interface specially designed for that purpose. Code4ML dataset can help address a number of software engineering or data science challenges through a data-driven approach. For example, it can be helpful for semantic code classification, code auto-completion, and code generation for an ML task specified in natural language.

Keywords