for (int it = 0; it < numIterations; it++) { for (int index = 0; index < cachedUserIDs.size(); index++) { long userId = cachedUserIDs[index]; long itemId = cachedItemIDs[index]; float rating = cachedValues[index]; updateParameters(userId, itemId, rating, currentLearningRate); } currentLearningRate *= learningRateDecay; }