public class Factorization extends Object
| Constructor and Description |
|---|
Factorization(FastByIDMap<Integer> userIDMapping,
FastByIDMap<Integer> itemIDMapping,
double[][] userFeatures,
double[][] itemFeatures) |
| Modifier and Type | Method and Description |
|---|---|
double[][] |
allItemFeatures() |
double[][] |
allUserFeatures() |
boolean |
equals(Object o) |
double[] |
getItemFeatures(long itemID) |
LongPrimitiveIterator |
getItemIDMappingKeys() |
Iterable<Map.Entry<Long,Integer>> |
getItemIDMappings() |
double[] |
getUserFeatures(long userID) |
LongPrimitiveIterator |
getUserIDMappingKeys() |
Iterable<Map.Entry<Long,Integer>> |
getUserIDMappings() |
int |
hashCode() |
int |
itemIndex(long itemID) |
int |
numFeatures() |
int |
numItems() |
int |
numUsers() |
int |
userIndex(long userID) |
public Factorization(FastByIDMap<Integer> userIDMapping, FastByIDMap<Integer> itemIDMapping, double[][] userFeatures, double[][] itemFeatures)
public double[][] allUserFeatures()
public double[] getUserFeatures(long userID)
throws NoSuchUserException
NoSuchUserExceptionpublic double[][] allItemFeatures()
public double[] getItemFeatures(long itemID)
throws NoSuchItemException
NoSuchItemExceptionpublic int userIndex(long userID)
throws NoSuchUserException
NoSuchUserExceptionpublic LongPrimitiveIterator getUserIDMappingKeys()
public int itemIndex(long itemID)
throws NoSuchItemException
NoSuchItemExceptionpublic LongPrimitiveIterator getItemIDMappingKeys()
public int numFeatures()
public int numUsers()
public int numItems()
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.