public final class ALSServingModel extends Object implements ServingModel
Modifier and Type | Method and Description |
---|---|
Collection<String> |
getAllItemIDs() |
Collection<String> |
getAllUserIDs() |
int |
getFeatures() |
float |
getFractionLoaded() |
Map<String,Integer> |
getItemCounts() |
float[] |
getItemVector(String item) |
Set<String> |
getKnownItems(String user) |
List<Pair<String,float[]>> |
getKnownItemVectorsForUser(String user) |
int |
getNumItems() |
int |
getNumUsers() |
RescorerProvider |
getRescorerProvider() |
Map<String,Integer> |
getUserCounts() |
float[] |
getUserVector(String user) |
Solver |
getYTYSolver() |
boolean |
isImplicit() |
Stream<Pair<String,Double>> |
topN(CosineDistanceSensitiveFunction scoreFn,
ToDoubleObjDoubleBiFunction<String> rescoreFn,
int howMany,
Predicate<String> allowedPredicate) |
String |
toString() |
public int getFeatures()
public boolean isImplicit()
public RescorerProvider getRescorerProvider()
public float[] getUserVector(String user)
public float[] getItemVector(String item)
public Set<String> getKnownItems(String user)
user
- user to get known items forpublic Map<String,Integer> getUserCounts()
public Map<String,Integer> getItemCounts()
public List<Pair<String,float[]>> getKnownItemVectorsForUser(String user)
user
- user to get known item vectors fornull
if the user is not known to the model, or if there are no known items for the userpublic Stream<Pair<String,Double>> topN(CosineDistanceSensitiveFunction scoreFn, ToDoubleObjDoubleBiFunction<String> rescoreFn, int howMany, Predicate<String> allowedPredicate)
public Collection<String> getAllUserIDs()
public Collection<String> getAllItemIDs()
public Solver getYTYSolver()
Solver
for use in solving systems involving YT*Ypublic int getNumUsers()
public int getNumItems()
public float getFractionLoaded()
getFractionLoaded
in interface ServingModel
Copyright © 2014–2018. All rights reserved.