org.apache.mahout.math.hadoop.decomposer
Class HdfsBackedLanczosState

java.lang.Object
  extended by org.apache.mahout.math.decomposer.lanczos.LanczosState
      extended by org.apache.mahout.math.hadoop.decomposer.HdfsBackedLanczosState
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable

public class HdfsBackedLanczosState
extends LanczosState
implements org.apache.hadoop.conf.Configurable


Field Summary
static String BASIS_PREFIX
           
static String SINGULAR_PREFIX
           
 
Fields inherited from class org.apache.mahout.math.decomposer.lanczos.LanczosState
basis, corpus, desiredRank, diagonalMatrix, iterationNumber, scaleFactor, singularValues, singularVectors
 
Constructor Summary
HdfsBackedLanczosState(VectorIterable corpus, int desiredRank, Vector initialVector, org.apache.hadoop.fs.Path dir)
           
 
Method Summary
protected  Vector fetchVector(org.apache.hadoop.fs.Path p, int keyIndex)
           
 Vector getBasisVector(int i)
           
 org.apache.hadoop.conf.Configuration getConf()
           
 Matrix getDiagonalMatrix()
           
 Vector getRightSingularVector(int i)
           
 double getScaleFactor()
           
protected  void persistVector(org.apache.hadoop.fs.Path p, int key, Vector vector)
           
 void setConf(org.apache.hadoop.conf.Configuration configuration)
           
 void setIterationNumber(int i)
           
protected  void updateHdfsState()
           
 
Methods inherited from class org.apache.mahout.math.decomposer.lanczos.LanczosState
getBasisSize, getCorpus, getIterationNumber, getSingularValue, intitializeBasisAndSingularVectors, setBasisVector, setRightSingularVector, setScaleFactor, setSingularValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASIS_PREFIX

public static final String BASIS_PREFIX
See Also:
Constant Field Values

SINGULAR_PREFIX

public static final String SINGULAR_PREFIX
See Also:
Constant Field Values
Constructor Detail

HdfsBackedLanczosState

public HdfsBackedLanczosState(VectorIterable corpus,
                              int desiredRank,
                              Vector initialVector,
                              org.apache.hadoop.fs.Path dir)
Method Detail

setConf

public void setConf(org.apache.hadoop.conf.Configuration configuration)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

setIterationNumber

public void setIterationNumber(int i)
Overrides:
setIterationNumber in class LanczosState

updateHdfsState

protected void updateHdfsState()
                        throws IOException
Throws:
IOException

persistVector

protected void persistVector(org.apache.hadoop.fs.Path p,
                             int key,
                             Vector vector)
                      throws IOException
Throws:
IOException

fetchVector

protected Vector fetchVector(org.apache.hadoop.fs.Path p,
                             int keyIndex)
                      throws IOException
Throws:
IOException

getBasisVector

public Vector getBasisVector(int i)
Overrides:
getBasisVector in class LanczosState

getRightSingularVector

public Vector getRightSingularVector(int i)
Overrides:
getRightSingularVector in class LanczosState

getScaleFactor

public double getScaleFactor()
Overrides:
getScaleFactor in class LanczosState

getDiagonalMatrix

public Matrix getDiagonalMatrix()
Overrides:
getDiagonalMatrix in class LanczosState


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.