public final class SSVDHelper extends Object
Modifier and Type | Method and Description |
---|---|
static Iterator<Pair<org.apache.hadoop.io.Writable,Vector>> |
drmIterator(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path glob,
org.apache.hadoop.conf.Configuration conf,
Deque<Closeable> closeables) |
static DenseMatrix |
drmLoadAsDense(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path glob,
org.apache.hadoop.conf.Configuration conf)
helper capabiltiy to load distributed row matrices into dense matrix (to
support tests mainly).
|
static double[][] |
extractRawData(Matrix m)
extracts row-wise raw data from a Mahout matrix for 3rd party solvers.
|
static DenseSymmetricMatrix |
loadAndSumUpperTriangularMatricesAsSymmetric(org.apache.hadoop.fs.Path glob,
org.apache.hadoop.conf.Configuration conf)
Load multiple upper triangular matrices and sum them up.
|
static Vector |
loadAndSumUpVectors(org.apache.hadoop.fs.Path glob,
org.apache.hadoop.conf.Configuration conf) |
static UpperTriangular |
loadUpperTriangularMatrix(org.apache.hadoop.fs.Path glob,
org.apache.hadoop.conf.Configuration conf)
Load only one upper triangular matrix and issue error if mroe than one is
found.
|
static void |
saveVector(Vector v,
org.apache.hadoop.fs.Path vectorFilePath,
org.apache.hadoop.conf.Configuration conf)
save single vector into hdfs file.
|
public static void saveVector(Vector v, org.apache.hadoop.fs.Path vectorFilePath, org.apache.hadoop.conf.Configuration conf) throws IOException
v
- vector to saveIOException
public static Iterator<Pair<org.apache.hadoop.io.Writable,Vector>> drmIterator(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path glob, org.apache.hadoop.conf.Configuration conf, Deque<Closeable> closeables) throws IOException
IOException
public static DenseMatrix drmLoadAsDense(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path glob, org.apache.hadoop.conf.Configuration conf) throws IOException
fs
- filesystemglob
- FS globconf
- configurationIOException
public static DenseSymmetricMatrix loadAndSumUpperTriangularMatricesAsSymmetric(org.apache.hadoop.fs.Path glob, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static Vector loadAndSumUpVectors(org.apache.hadoop.fs.Path glob, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static UpperTriangular loadUpperTriangularMatrix(org.apache.hadoop.fs.Path glob, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static double[][] extractRawData(Matrix m)
DenseMatrix
at
this point, so we have to resort to abstract element-wise copying.Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.