|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.text.topic.LatentSemanticAnalysis.Transform
public static class LatentSemanticAnalysis.Transform
The result from doing latent semantic analysis (LSA). It is a transform that can be applied as a dimensionality reduction.
Field Summary | |
---|---|
protected Matrix |
singularValues
The diagonal matrix of singular values. |
protected Matrix |
termBasis
The matrix of orthogonal term column vectors. |
protected Matrix |
transform
The cached transform matrix. |
Constructor Summary | |
---|---|
LatentSemanticAnalysis.Transform(Matrix termBasis,
Matrix singularValues)
Create a new Transform |
Method Summary | |
---|---|
Vector |
evaluate(Vectorizable input)
Evaluates the function on the given input and returns the output. |
int |
getInputDimensionality()
Gets the expected dimensionality of the input vector to the evaluator, if it is known. |
int |
getOutputDimensionality()
Gets the expected dimensionality of the output vector of the evaluator, if it is known. |
int |
getRank()
Gets the rank of the LSA. |
Matrix |
getSingularValues()
Gets the diagonal matrix of singular values. |
Matrix |
getTermBasis()
Gets the matrix of orthogonal term column vectors. |
Vector |
getTermVector(int i)
Gets the i-th orthogonal term vector that makes up the basis for the transform. |
Matrix |
getTransform()
Gets the cached transform matrix. |
protected void |
setSingularValues(Matrix singularValues)
Sets the diagonal matrix of singular values. |
protected void |
setTermBasis(Matrix termBasis)
Sets the matrix of orthogonal term column vectors. |
protected void |
setTransform(Matrix transform)
Gets the cached transform matrix. |
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable |
---|
clone |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Matrix termBasis
protected Matrix singularValues
protected Matrix transform
Constructor Detail |
---|
public LatentSemanticAnalysis.Transform(Matrix termBasis, Matrix singularValues)
Transform
termBasis
- The matrix of orthogonal term column vectors.singularValues
- The diagonal matrix of singular values.Method Detail |
---|
public Vector evaluate(Vectorizable input)
Evaluator
evaluate
in interface Evaluator<Vectorizable,Vector>
input
- The input to evaluate.
public int getInputDimensionality()
VectorInputEvaluator
getInputDimensionality
in interface VectorInputEvaluator<Vectorizable,Vector>
public int getOutputDimensionality()
VectorOutputEvaluator
getOutputDimensionality
in interface VectorOutputEvaluator<Vectorizable,Vector>
public int getRank()
public Vector getTermVector(int i)
i
- An index. Must be between 0 (inclusive) and rank (exclusive).
public Matrix getTermBasis()
protected void setTermBasis(Matrix termBasis)
termBasis
- The matrix of orthogonal term column vectors.public Matrix getSingularValues()
protected void setSingularValues(Matrix singularValues)
singularValues
- The diagonal matrix of singular values.public Matrix getTransform()
protected void setTransform(Matrix transform)
transform
- The cached transform matrix.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |