int numUsers = dataModel.getNumUsers();
userMap = new FastByIDMap<Integer>(numUsers);
int idx = 0;
LongPrimitiveIterator userIterator = dataModel.getUserIDs();
while (userIterator.hasNext()) {
userMap.put(userIterator.nextLong(), idx++);
}
int numItems = dataModel.getNumItems();
itemMap = new FastByIDMap<Integer>(numItems);
idx = 0;
LongPrimitiveIterator itemIterator = dataModel.getItemIDs();
while (itemIterator.hasNext()) {
itemMap.put(itemIterator.nextLong(), idx++);
}
double average = getAveragePreference();
double defaultValue = Math.sqrt((average - 1.0) / numFeatures);