This changes the selection of the test/val sets from the candidates.
All the candidates satisfy the distribution requirements, and previously we just chose the smallest test/val set satisfying these requirements. However, a problem with this is that some of the speakers included end up not really having the dialect that they said they had.
The solution proposed in this PR is that we select the test/val set based on both having minimal length as well as maximal CER from the validation model. We do this by sorting the candidates separately by length (ascending) and CER (descending), and adding up the "length rank" and "CER rank" for each candidate, and choosing the candidate with the smallest rank sum. This will then satisfy the best compromise, being as small as possible while being more difficult.
A difference in CER distribution across dialects can be seen in this screenshot:
This changes the selection of the test/val sets from the candidates.
All the candidates satisfy the distribution requirements, and previously we just chose the smallest test/val set satisfying these requirements. However, a problem with this is that some of the speakers included end up not really having the dialect that they said they had.
The solution proposed in this PR is that we select the test/val set based on both having minimal length as well as maximal CER from the validation model. We do this by sorting the candidates separately by length (ascending) and CER (descending), and adding up the "length rank" and "CER rank" for each candidate, and choosing the candidate with the smallest rank sum. This will then satisfy the best compromise, being as small as possible while being more difficult.
A difference in CER distribution across dialects can be seen in this screenshot:
This change results in the following test set:
It results in the following validation set: