public interface ResultMap extends Map<Long,Result>, Iterable<Result>
A map of results from a recommender operation. This is returned from operations such as predict that provide scores or values for a collection of items, but do not rank or find items.
| Modifier and Type | Method and Description |
|---|---|
Result |
get(long key)
Get a result without boxing the key.
|
double |
getScore(long id)
Get the score associated with an ID.
|
Map<Long,Double> |
scoreMap()
View this result set as a map from longs to doubles.
|
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesforEach, iterator, spliteratorMap<Long,Double> scoreMap()
View this result set as a map from longs to doubles.
@Nullable Result get(long key)
Get a result without boxing the key.
key - The item ID.null if the key is not in the map.double getScore(long id)
Get the score associated with an ID.
id - The ID to query.id, or Double.NaN if there is no score.