org.apache.mahout.cf.taste.impl.recommender.svd
Class Factorization

java.lang.Object
  extended by org.apache.mahout.cf.taste.impl.recommender.svd.Factorization

public class Factorization
extends Object

a factorization of the rating matrix


Constructor Summary
Factorization(FastByIDMap<Integer> userIDMapping, FastByIDMap<Integer> itemIDMapping, double[][] userFeatures, double[][] itemFeatures)
           
 
Method Summary
 boolean equals(Object o)
           
 double[] getItemFeatures(long itemID)
           
 Iterable<Map.Entry<Long,Integer>> getItemIDMappings()
           
 double[] getUserFeatures(long userID)
           
 Iterable<Map.Entry<Long,Integer>> getUserIDMappings()
           
 int hashCode()
           
 int numFeatures()
           
 int numItems()
           
 int numUsers()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Factorization

public Factorization(FastByIDMap<Integer> userIDMapping,
                     FastByIDMap<Integer> itemIDMapping,
                     double[][] userFeatures,
                     double[][] itemFeatures)
Method Detail

getUserFeatures

public double[] getUserFeatures(long userID)
                         throws NoSuchUserException
Throws:
NoSuchUserException

getItemFeatures

public double[] getItemFeatures(long itemID)
                         throws NoSuchItemException
Throws:
NoSuchItemException

getUserIDMappings

public Iterable<Map.Entry<Long,Integer>> getUserIDMappings()

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-2012 The Apache Software Foundation. All Rights Reserved.