Browse files

Update examples in README.

  • Loading branch information...
1 parent 8b3307f commit e220f847a103f64c7b0ed71398823b2c45d1253f Leif Johnson committed Apr 4, 2012
Showing with 3 additions and 6 deletions.
  1. +3 −6
@@ -31,7 +31,7 @@ in a log file as the experiments run. Here's a snippet from an example log file:
All of those "training accuracy" lines hidden in there will give us a good idea
of how well the algorithm is performing. To get a quick plot of them:
- cat ~/Experiments/tagger-beam1.log | py-grep-plot 'training accuracy: ([.\d]+)'
+ cat ~/Experiments/tagger-beam1.log | py-grep-plot -r 'training accuracy: ([.\d]+)'
If you have your matplotlib configured with an interactive backend, you should
see a nice little plot appear.
@@ -53,8 +53,7 @@ values will be plotted on the ordinate, in data-file order. If you want explicit
control over the abscissa, just include another match group in your regular
- nl ~/Experiments/tagger-beam1.log | \
- py-grep-plot -r '^(\d+) .* training accuracy: ([.\d]+)'
+ nl ~/Experiments/tagger-beam1.log | py-grep-plot -r '^(\d+) .* training accuracy: ([.\d]+)'
(The `nl` utility numbers the lines of the input file.)
@@ -79,9 +78,7 @@ that contains `training accuracy: XX` and `evaluation accuracy: XX` lines that
you'd like to plot. You can use the nifty subshell redirection operator to sort
these two data sources:
- py-grep-plot -r 'accuracy: (\d+)' \
- <(grep 'training acc' file) \
- <(grep 'evaluation acc' file)
+ py-grep-plot -r 'accuracy: (\d+)' <(grep 'training acc' file) <(grep 'evaluation acc' file)
### Smoothing

0 comments on commit e220f84

Please sign in to comment.