|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.matrix.factorization.PartialSingularValueDecomposition
public class PartialSingularValueDecomposition
Performs matrix factorization using the Singular Value Decomposition algorithm.
| Field Summary | |
|---|---|
protected org.apache.mahout.math.matrix.DoubleMatrix2D |
A
Input matrix |
protected static int |
DEFAULT_K
The default number of desired base vectors |
protected int |
k
The desired number of base vectors |
protected org.apache.mahout.math.matrix.DoubleMatrix2D |
U
Base vector result matrix |
protected org.apache.mahout.math.matrix.DoubleMatrix2D |
V
Coefficient result matrix |
| Constructor Summary | |
|---|---|
PartialSingularValueDecomposition(org.apache.mahout.math.matrix.DoubleMatrix2D A)
Computes a partial SVD of a matrix. |
|
| Method Summary | |
|---|---|
void |
compute()
Computes the factorization. |
int |
getK()
Returns the number of base vectors k . |
double[] |
getSingularValues()
Returns singular values of the matrix. |
org.apache.mahout.math.matrix.DoubleMatrix2D |
getU()
Returns the U matrix (base vectors matrix). |
org.apache.mahout.math.matrix.DoubleMatrix2D |
getV()
Returns the V matrix (coefficient matrix) |
void |
setK(int k)
Sets the number of base vectors k . |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.carrot2.matrix.factorization.IMatrixFactorization |
|---|
getU, getV |
| Field Detail |
|---|
protected int k
protected static final int DEFAULT_K
protected org.apache.mahout.math.matrix.DoubleMatrix2D A
protected org.apache.mahout.math.matrix.DoubleMatrix2D U
protected org.apache.mahout.math.matrix.DoubleMatrix2D V
| Constructor Detail |
|---|
public PartialSingularValueDecomposition(org.apache.mahout.math.matrix.DoubleMatrix2D A)
compute()method.
A - matrix to be factorized| Method Detail |
|---|
public void compute()
public String toString()
toString in class Objectpublic double[] getSingularValues()
public void setK(int k)
k - the number of base vectorspublic int getK()
public org.apache.mahout.math.matrix.DoubleMatrix2D getU()
IMatrixFactorization
getU in interface IMatrixFactorizationpublic org.apache.mahout.math.matrix.DoubleMatrix2D getV()
IMatrixFactorization
getV in interface IMatrixFactorization
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||