public final class SSVDSolver extends Object
run()
.
getUPath()
(if computed) returns the path to the directory
containing m x k U matrix file(s).
getVPath()
(if computed) returns the path to the directory
containing n x k V matrix file(s).
Constructor and Description |
---|
SSVDSolver(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path[] inputPath,
org.apache.hadoop.fs.Path outputPath,
int ablockRows,
int k,
int p,
int reduceTasks)
create new SSVD solver.
|
Modifier and Type | Method and Description |
---|---|
int |
getAbtBlockHeight() |
int |
getOuterBlockHeight() |
org.apache.hadoop.fs.Path |
getPcaMeanPath()
Optional.
|
int |
getQ() |
Vector |
getSingularValues()
This contains k+p singular values resulted from the solver run.
|
String |
getuHalfSigmaPath() |
String |
getUPath()
returns U path (if computation were requested and successful).
|
String |
getuSigmaPath() |
String |
getvHalfSigmaPath() |
String |
getVPath()
return V path ( if computation was requested and successful ) .
|
String |
getvSigmaPath() |
boolean |
isBroadcast() |
boolean |
isOverwrite() |
void |
run()
run all SSVD jobs.
|
void |
setAbtBlockHeight(int abtBlockHeight)
the block height of Y_i during power iterations.
|
void |
setBroadcast(boolean broadcast)
If this property is true, use DestributedCache mechanism to broadcast some
stuff around.
|
void |
setComputeU(boolean val)
The setting controlling whether to compute U matrix of low rank SSVD.
|
void |
setComputeV(boolean val)
Setting controlling whether to compute V matrix of low-rank SSVD.
|
void |
setcUHalfSigma(boolean cUHat) |
void |
setcUSigma(boolean cUSigma) |
void |
setcVHalfSigma(boolean cVHat) |
void |
setcVSigma(boolean cVSigma) |
void |
setMinSplitSize(int size)
Sometimes, if requested A blocks become larger than a split, we may need to
use that to ensure at least k+p rows of A get into a split.
|
void |
setOuterBlockHeight(int outerBlockHeight)
The height of outer blocks during Q'A multiplication.
|
void |
setOverwrite(boolean overwrite)
if true, driver to clean output folder first if exists.
|
void |
setPcaMeanPath(org.apache.hadoop.fs.Path pcaMeanPath) |
void |
setQ(int q)
sets q, amount of additional power iterations to increase precision
(0..2!).
|
public SSVDSolver(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path[] inputPath, org.apache.hadoop.fs.Path outputPath, int ablockRows, int k, int p, int reduceTasks)
conf
- hadoop configurationinputPath
- Input path (should be compatible with DistributedRowMatrix as of
the time of this writing).outputPath
- Output path containing U, V and singular values vector files.ablockRows
- The vertical hight of a q-block (bigger value require more memory
in mappers+ perhaps larger minSplitSize
valuesk
- desired rankp
- SSVD oversampling parameterreduceTasks
- Number of reduce tasks (where applicable)public int getQ()
public void setQ(int q)
q
- public void setComputeU(boolean val)
public void setComputeV(boolean val)
val
- true if we want to output V matrix. Default is true.public void setcUHalfSigma(boolean cUHat)
cUHat
- whether produce U*Sigma^0.5 as well (default false)public void setcVHalfSigma(boolean cVHat)
cVHat
- whether produce V*Sigma^0.5 as well (default false)public void setcUSigma(boolean cUSigma)
cUSigma
- whether produce U*Sigma output as well (default false)public void setcVSigma(boolean cVSigma)
cVSigma
- whether produce V*Sigma output as well (default false)public void setMinSplitSize(int size)
size
- the minimum split size to usepublic Vector getSingularValues()
public String getUPath()
public String getVPath()
public String getuSigmaPath()
public String getuHalfSigmaPath()
public String getvSigmaPath()
public String getvHalfSigmaPath()
public boolean isOverwrite()
public void setOverwrite(boolean overwrite)
overwrite
- public int getOuterBlockHeight()
public void setOuterBlockHeight(int outerBlockHeight)
outerBlockHeight
- public int getAbtBlockHeight()
public void setAbtBlockHeight(int abtBlockHeight)
abtBlockHeight
- public boolean isBroadcast()
public void setBroadcast(boolean broadcast)
broadcast
- public org.apache.hadoop.fs.Path getPcaMeanPath()
public void setPcaMeanPath(org.apache.hadoop.fs.Path pcaMeanPath)
public void run() throws IOException
IOException
- if I/O condition occurs.Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.