org.apache.mahout.cf.taste.impl.recommender.svd
Class Factorization
java.lang.Object
org.apache.mahout.cf.taste.impl.recommender.svd.Factorization
public class Factorization
- extends Object
a factorization of the rating matrix
Factorization
public Factorization(FastByIDMap<Integer> userIDMapping,
FastByIDMap<Integer> itemIDMapping,
double[][] userFeatures,
double[][] itemFeatures)
allUserFeatures
public double[][] allUserFeatures()
getUserFeatures
public double[] getUserFeatures(long userID)
throws NoSuchUserException
- Throws:
NoSuchUserException
allItemFeatures
public double[][] allItemFeatures()
getItemFeatures
public double[] getItemFeatures(long itemID)
throws NoSuchItemException
- Throws:
NoSuchItemException
userIndex
public int userIndex(long userID)
throws NoSuchUserException
- Throws:
NoSuchUserException
getUserIDMappings
public Iterable<Map.Entry<Long,Integer>> getUserIDMappings()
itemIndex
public int itemIndex(long itemID)
throws NoSuchItemException
- Throws:
NoSuchItemException
getItemIDMappings
public Iterable<Map.Entry<Long,Integer>> getItemIDMappings()
numFeatures
public int numFeatures()
numUsers
public int numUsers()
numItems
public int numItems()
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.