TrainingEstimator(PreferenceSnapshot snap, ItemScorer baseline, PreferenceDomain dom) {
ratings = snap.getRatings();
domain = dom;
estimates = new double[ratings.size()];
final LongCollection userIds = snap.getUserIds();
LongIterator userIter = userIds.iterator();
while (userIter.hasNext()) {
long uid = userIter.nextLong();
SparseVector rvector = snap.userRatingVector(uid);
MutableSparseVector blpreds = MutableSparseVector.create(rvector.keySet());
baseline.score(uid, blpreds);