Datasets:

Modalities:
Text
Formats:
json
Languages:
code
Libraries:
Datasets
pandas
License:
loubnabnl HF Staff commited on
Commit
8458618
·
1 Parent(s): 3850740

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -1
README.md CHANGED
@@ -1,3 +1,69 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ pretty_name: CodeComplex
3
+ annotations_creators: []
4
+ language_creators:
5
+ - expert-generated
6
+ languages: ["code"]
7
+ licenses:
8
+ - apache-2.0
9
+ multilinguality:
10
+ - monolingual
11
+ size_categories:
12
+ - unknown
13
+ source_datasets: []
14
+ task_categories:
15
+ - sequence-modeling
16
+ task_ids:
17
+ - language-modeling
18
  ---
19
+
20
+ # CodeComplex Dataset
21
+
22
+ ## Dataset Description
23
+ CodeComplex consists of 4,200 Java codes submitted to programming competitions by human programmers and their complexity labels annotated by a group of algorithm experts.
24
+
25
+ ### How to use it
26
+
27
+ You can load and iterate through the dataset with the following two lines of code:
28
+
29
+ ```python
30
+ from datasets import load_dataset
31
+
32
+ ds = load_dataset("codeparrot/codecomplex", split="train")
33
+ print(next(iter(ds)))
34
+ ```
35
+
36
+ ## Data Structure
37
+
38
+ ### Data Instances
39
+
40
+ ```python
41
+ {'src': 'import java.io.*;\nimport java.math.BigInteger;\nimport java.util.InputMismatchException;...',
42
+ 'complexity': 'quadratic',
43
+ 'problem': '1179_B. Tolik and His Uncle',
44
+ 'from': 'CODEFORCES'}
45
+ ```
46
+
47
+ ### Data Fields
48
+
49
+ * src: a string feature, representing the source code in Java.
50
+ * complexity: a string feature, giving program complexity.
51
+ * problem: a string of the feature, representing the problem name.
52
+ * from: a string feature, representing the source of the problem.
53
+
54
+ complexity filed has 7 classes, where each class has around 500 codes each. The seven classes are constant, linear, quadratic, cubic, log(n), nlog(n) and NP-hard.
55
+ ### Data Splits
56
+
57
+ The dataset only contains a train split.
58
+
59
+ ## Dataset Creation
60
+ The authors first collected problem and solution codes in Java from CodeForces and they were inspected by experienced human annotators to label each code by their time complexity. After the labelling, they used different programming experts to verify the class of each data that the human annotators assigned.
61
+
62
+ ## Citation Information
63
+ ```
64
+ @article{JeonBHHK22,
65
+ author = {Mingi Jeon and Seung-Yeop Baik and Joonghyuk Hahn and Yo-Sub Han and Sang-Ki Ko},
66
+ title = {{Deep Learning-based Code Complexity Prediction}},
67
+ year = {2022},
68
+ }
69
+ ```