We select N by determining the value that optimises the correlation over the training data.
the selection of N and accordingly the best-N languages are based on nested cross-validation over training data, independently of the test data for that iteration of cross-validation.