Skip to content

Commit d8d81f3

Browse files
committed
add notes about generating graphs
1 parent d317a8d commit d8d81f3

4 files changed

Lines changed: 46 additions & 1 deletion

File tree

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,49 @@ median of [5:19] formatting 2244ms
204204

205205
## Generating graphs from paper
206206

207-
In the *Universal Code Formatting Through Machine Learning* paper, we have three graphs to support our conclusions. This sections shows how to reproduce them.
207+
In the *Universal Code Formatting Through Machine Learning* paper, we have three graphs to support our conclusions. This sections shows how to reproduce them. (Note that these jobs take many minutes to run; maybe up to 30 minutes for one of them on a fast box.)
208+
209+
### Box plot with median error rates
210+
211+
To generate:
212+
213+
<img src="images/leave_one_out.png" width="400">
214+
215+
do this:
216+
217+
```bash
218+
$ mvn clean compile install
219+
$ java -Xms8G -Xss1M -cp target/codebuff-1.4.19.jar org.antlr.codebuff.validation.LeaveOneOutValidator
220+
...
221+
222+
```
223+
224+
### Plot showing effect of corpus size on error rate
225+
226+
To generate:
227+
228+
<img src="images/subset_validator.png" width="400">
229+
230+
do this:
231+
232+
```bash
233+
$ mvn clean compile install
234+
$ java -Xms8G -Xss1M -cp target/codebuff-1.4.19.jar org.antlr.codebuff.validation.SubsetValidator
235+
...
236+
237+
```
238+
239+
### Plot showing effect of varying model parameter k
240+
241+
To generate:
242+
243+
<img src="images/vary_k.png" width="400">
244+
245+
do this:
246+
247+
```bash
248+
$ mvn clean compile install
249+
$ java -Xms8G -Xss1M -cp target/codebuff-1.4.19.jar org.antlr.codebuff.validation.TestK
250+
...
251+
252+
```

images/leave_one_out.png

299 KB
Loading

images/subset_validator.png

491 KB
Loading

images/vary_k.png

314 KB
Loading

0 commit comments

Comments
 (0)