Skip to content

Commit

Permalink
Docs(CER) (#2342)
Browse files Browse the repository at this point in the history
CER can actually be greater than 1.
  • Loading branch information
borisdayma committed May 10, 2021
1 parent 4047443 commit 48c97d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metrics/cer/cer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def process_list(self, inp: List[str]):
_DESCRIPTION = """\
Character error rate (CER) is a common metric of the performance of an automatic speech recognition system.
CER is similar to Word Error Rate (WER), but operate on character insted of word. Please refer to docs of WER for further information.
CER is similar to Word Error Rate (WER), but operates on character instead of word. Please refer to docs of WER for further information.
Character error rate can be computed as:
Expand All @@ -71,7 +71,7 @@ def process_list(self, inp: List[str]):
C is the number of correct characters,
N is the number of characters in the reference (N=S+D+C).
CER's output is always a number between 0 and 1. This value indicates the percentage of characters that were incorrectly predicted. The lower the value, the better the
CER's output is not always a number between 0 and 1, in particular when there is a high number of insertions. This value is often associated to the percentage of characters that were incorrectly predicted. The lower the value, the better the
performance of the ASR system with a CER of 0 being a perfect score.
"""

Expand Down

1 comment on commit 48c97d3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show benchmarks

PyArrow==1.0.0

Show updated benchmarks!

Benchmark: benchmark_array_xd.json

metric read_batch_formatted_as_numpy after write_array2d read_batch_formatted_as_numpy after write_flattened_sequence read_batch_formatted_as_numpy after write_nested_sequence read_batch_unformated after write_array2d read_batch_unformated after write_flattened_sequence read_batch_unformated after write_nested_sequence read_col_formatted_as_numpy after write_array2d read_col_formatted_as_numpy after write_flattened_sequence read_col_formatted_as_numpy after write_nested_sequence read_col_unformated after write_array2d read_col_unformated after write_flattened_sequence read_col_unformated after write_nested_sequence read_formatted_as_numpy after write_array2d read_formatted_as_numpy after write_flattened_sequence read_formatted_as_numpy after write_nested_sequence read_unformated after write_array2d read_unformated after write_flattened_sequence read_unformated after write_nested_sequence write_array2d write_flattened_sequence write_nested_sequence
new / old (diff) 0.026304 / 0.011353 (0.014951) 0.019556 / 0.011008 (0.008548) 0.064550 / 0.038508 (0.026042) 0.043039 / 0.023109 (0.019930) 0.418673 / 0.275898 (0.142775) 0.499082 / 0.323480 (0.175603) 0.013361 / 0.007986 (0.005375) 0.006210 / 0.004328 (0.001882) 0.014305 / 0.004250 (0.010055) 0.056682 / 0.037052 (0.019630) 0.432885 / 0.258489 (0.174396) 0.507281 / 0.293841 (0.213440) 0.194307 / 0.128546 (0.065761) 0.147457 / 0.075646 (0.071811) 0.520732 / 0.419271 (0.101460) 0.463357 / 0.043533 (0.419824) 0.416266 / 0.255139 (0.161127) 0.445537 / 0.283200 (0.162337) 1.880580 / 0.141683 (1.738898) 2.042338 / 1.452155 (0.590183) 2.077052 / 1.492716 (0.584335)

Benchmark: benchmark_getitem_100B.json

metric get_batch_of_1024_random_rows get_batch_of_1024_rows get_first_row get_last_row
new / old (diff) 0.016963 / 0.018006 (-0.001044) 0.560084 / 0.000490 (0.559594) 0.002416 / 0.000200 (0.002216) 0.000085 / 0.000054 (0.000030)

Benchmark: benchmark_indices_mapping.json

metric select shard shuffle sort train_test_split
new / old (diff) 0.052470 / 0.037411 (0.015059) 0.028686 / 0.014526 (0.014160) 0.043836 / 0.176557 (-0.132720) 0.055059 / 0.737135 (-0.682076) 0.036057 / 0.296338 (-0.260281)

Benchmark: benchmark_iterating.json

metric read 5000 read 50000 read_batch 50000 10 read_batch 50000 100 read_batch 50000 1000 read_formatted numpy 5000 read_formatted pandas 5000 read_formatted tensorflow 5000 read_formatted torch 5000 read_formatted_batch numpy 5000 10 read_formatted_batch numpy 5000 1000 shuffled read 5000 shuffled read 50000 shuffled read_batch 50000 10 shuffled read_batch 50000 100 shuffled read_batch 50000 1000 shuffled read_formatted numpy 5000 shuffled read_formatted_batch numpy 5000 10 shuffled read_formatted_batch numpy 5000 1000
new / old (diff) 0.552049 / 0.215209 (0.336840) 5.465545 / 2.077655 (3.387890) 2.567510 / 1.504120 (1.063390) 2.162730 / 1.541195 (0.621535) 2.229927 / 1.468490 (0.761437) 8.286053 / 4.584777 (3.701276) 7.378937 / 3.745712 (3.633225) 10.395847 / 5.269862 (5.125985) 9.144522 / 4.565676 (4.578845) 0.833171 / 0.424275 (0.408896) 0.016163 / 0.007607 (0.008556) 0.768928 / 0.226044 (0.542884) 7.045557 / 2.268929 (4.776628) 3.326565 / 55.444624 (-52.118059) 2.633224 / 6.876477 (-4.243253) 2.628540 / 2.142072 (0.486467) 8.548316 / 4.805227 (3.743089) 7.488567 / 6.500664 (0.987903) 10.132865 / 0.075469 (10.057396)

Benchmark: benchmark_map_filter.json

metric filter map fast-tokenizer batched map identity map identity batched map no-op batched map no-op batched numpy map no-op batched pandas map no-op batched pytorch map no-op batched tensorflow
new / old (diff) 12.540284 / 1.841788 (10.698496) 14.427893 / 8.074308 (6.353585) 42.604694 / 10.191392 (32.413302) 0.980393 / 0.680424 (0.299969) 0.667054 / 0.534201 (0.132853) 0.911065 / 0.579283 (0.331782) 0.759207 / 0.434364 (0.324843) 0.841197 / 0.540337 (0.300860) 1.867212 / 1.386936 (0.480276)
PyArrow==latest
Show updated benchmarks!

Benchmark: benchmark_array_xd.json

metric read_batch_formatted_as_numpy after write_array2d read_batch_formatted_as_numpy after write_flattened_sequence read_batch_formatted_as_numpy after write_nested_sequence read_batch_unformated after write_array2d read_batch_unformated after write_flattened_sequence read_batch_unformated after write_nested_sequence read_col_formatted_as_numpy after write_array2d read_col_formatted_as_numpy after write_flattened_sequence read_col_formatted_as_numpy after write_nested_sequence read_col_unformated after write_array2d read_col_unformated after write_flattened_sequence read_col_unformated after write_nested_sequence read_formatted_as_numpy after write_array2d read_formatted_as_numpy after write_flattened_sequence read_formatted_as_numpy after write_nested_sequence read_unformated after write_array2d read_unformated after write_flattened_sequence read_unformated after write_nested_sequence write_array2d write_flattened_sequence write_nested_sequence
new / old (diff) 0.026870 / 0.011353 (0.015517) 0.018663 / 0.011008 (0.007655) 0.056785 / 0.038508 (0.018276) 0.042367 / 0.023109 (0.019257) 0.372135 / 0.275898 (0.096237) 0.408282 / 0.323480 (0.084803) 0.012687 / 0.007986 (0.004701) 0.005700 / 0.004328 (0.001372) 0.013470 / 0.004250 (0.009219) 0.063444 / 0.037052 (0.026391) 0.376415 / 0.258489 (0.117926) 0.410683 / 0.293841 (0.116842) 0.189807 / 0.128546 (0.061261) 0.149034 / 0.075646 (0.073388) 0.505587 / 0.419271 (0.086316) 0.469081 / 0.043533 (0.425548) 0.374985 / 0.255139 (0.119846) 0.398549 / 0.283200 (0.115349) 1.861995 / 0.141683 (1.720313) 1.975825 / 1.452155 (0.523670) 2.092133 / 1.492716 (0.599417)

Benchmark: benchmark_getitem_100B.json

metric get_batch_of_1024_random_rows get_batch_of_1024_rows get_first_row get_last_row
new / old (diff) 0.010038 / 0.018006 (-0.007968) 0.585420 / 0.000490 (0.584930) 0.000392 / 0.000200 (0.000192) 0.000096 / 0.000054 (0.000042)

Benchmark: benchmark_indices_mapping.json

metric select shard shuffle sort train_test_split
new / old (diff) 0.044873 / 0.037411 (0.007462) 0.030934 / 0.014526 (0.016409) 0.029934 / 0.176557 (-0.146623) 0.054266 / 0.737135 (-0.682869) 0.034064 / 0.296338 (-0.262274)

Benchmark: benchmark_iterating.json

metric read 5000 read 50000 read_batch 50000 10 read_batch 50000 100 read_batch 50000 1000 read_formatted numpy 5000 read_formatted pandas 5000 read_formatted tensorflow 5000 read_formatted torch 5000 read_formatted_batch numpy 5000 10 read_formatted_batch numpy 5000 1000 shuffled read 5000 shuffled read 50000 shuffled read_batch 50000 10 shuffled read_batch 50000 100 shuffled read_batch 50000 1000 shuffled read_formatted numpy 5000 shuffled read_formatted_batch numpy 5000 10 shuffled read_formatted_batch numpy 5000 1000
new / old (diff) 0.524881 / 0.215209 (0.309672) 5.167580 / 2.077655 (3.089925) 2.488980 / 1.504120 (0.984860) 2.215618 / 1.541195 (0.674423) 2.231478 / 1.468490 (0.762988) 7.878069 / 4.584777 (3.293292) 6.979489 / 3.745712 (3.233777) 9.951097 / 5.269862 (4.681235) 8.596176 / 4.565676 (4.030500) 0.766623 / 0.424275 (0.342348) 0.012259 / 0.007607 (0.004652) 0.681516 / 0.226044 (0.455472) 6.830242 / 2.268929 (4.561313) 3.251924 / 55.444624 (-52.192700) 2.650698 / 6.876477 (-4.225779) 2.708366 / 2.142072 (0.566294) 8.252955 / 4.805227 (3.447728) 5.941166 / 6.500664 (-0.559498) 10.330857 / 0.075469 (10.255388)

Benchmark: benchmark_map_filter.json

metric filter map fast-tokenizer batched map identity map identity batched map no-op batched map no-op batched numpy map no-op batched pandas map no-op batched pytorch map no-op batched tensorflow
new / old (diff) 13.016430 / 1.841788 (11.174642) 14.323658 / 8.074308 (6.249350) 40.773282 / 10.191392 (30.581889) 0.961809 / 0.680424 (0.281385) 0.675491 / 0.534201 (0.141290) 0.897177 / 0.579283 (0.317894) 0.717049 / 0.434364 (0.282685) 0.803292 / 0.540337 (0.262955) 1.730697 / 1.386936 (0.343760)

CML watermark

Please sign in to comment.