n-pairs implementation for prediction phenotype