code: protected double getNumberOfRelevantItems(final U user) {
          int n = 0;
          if (getTest().getUserItems(user) != null) {
              for (I i : getTest().getUserItems(user)) {
                  if (getTest().getUserItemPreference(user, i) >= relevanceThreshold) {
                      n++;
                  }
              }
          }
          return n * 1.0;
      }
docs: Method that computes the number of relevant items in the test set for a
  user.
  
  @param user a user
  @return the number of relevant items the user has in the test set