| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 70f4e82 commit 918168c
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -201,7 +201,7 @@ def parse_csv(input, delim=','): | |||
| 201 | 201 | return [list(map(num_or_str, line.split(delim))) for line in lines] | |
| 202 | 202 | ||
| 203 | 203 | ||
| 204 | - def err_ratio(predict, dataset, examples=None, verbose=0): | ||
| 204 | + def err_ratio(predict, dataset, examples=None): | ||
| 205 | 205 | """ | |
| 206 | 206 | Return the proportion of the examples that are NOT correctly predicted. | |
| 207 | 207 | verbose - 0: No output; 1: Output wrong; 2 (or greater): Output correct | |
@@ -215,10 +215,6 @@ def err_ratio(predict, dataset, examples=None, verbose=0): | |||
| 215 | 215 | output = predict(dataset.sanitize(example)) | |
| 216 | 216 | if output == desired: | |
| 217 | 217 | right += 1 | |
| 218 | - if verbose >= 2: | ||
| 219 | - print(' OK: got {} for {}'.format(desired, example)) | ||
| 220 | - elif verbose: | ||
| 221 | - print('WRONG: got {}, expected {} for {}'.format(output, desired, example)) | ||
| 222 | 218 | return 1 - (right / len(examples)) | |
| 223 | 219 | ||
| 224 | 220 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments