logger.info("predicting {} items", items.size());
Symbol pchan = getPrintChannel();
Stopwatch timer = Stopwatch.createStarted();
SparseVector preds = pred.predict(user, items);
Long2ObjectMap channel = null;
if (pchan != null) {
for (TypedSymbol sym: preds.getChannelSymbols()) {
if (sym.getRawSymbol().equals(pchan)) {
channel = preds.getChannel(sym);
}
}
}
for (VectorEntry e: preds) {
System.out.format(" %d: %.3f", e.getKey(), e.getValue());
if (channel != null) {
System.out.format(" (%s)", channel.get(e.getKey()));
}
System.out.println();
}
timer.stop();
logger.info("predicted for {} items in {}", items.size(), timer);