gov.sandia.cognition.text.topic
Class ProbabilisticLatentSemanticAnalysis.Result

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.text.topic.ProbabilisticLatentSemanticAnalysis.Result
All Implemented Interfaces:
Evaluator<Vectorizable,Vector>, VectorInputEvaluator<Vectorizable,Vector>, VectorOutputEvaluator<Vectorizable,Vector>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
ProbabilisticLatentSemanticAnalysis

public static class ProbabilisticLatentSemanticAnalysis.Result
extends AbstractCloneableSerializable
implements Evaluator<Vectorizable,Vector>, VectorInputEvaluator<Vectorizable,Vector>, VectorOutputEvaluator<Vectorizable,Vector>

The dimensionality transform created by probabilistic latent semantic analysis.

See Also:
Serialized Form

Field Summary
protected  int latentCount
          The number of latent variables.
protected  ProbabilisticLatentSemanticAnalysis.LatentData[] latents
          The latent variable data.
protected  int maxIterations
          The maximum number of iterations for the E-M evaluation.
protected  double minimumChange
          The minimum change in log-likelihood for the E-M evaluation.
protected  int termCount
          The number of terms.
 
Constructor Summary
ProbabilisticLatentSemanticAnalysis.Result(int termCount, ProbabilisticLatentSemanticAnalysis.LatentData[] latents)
          Creates a new probabilistic latent semantic analysis 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.
protected  double step(Vector query, Matrix pLatentGivenQueryTerm, Vector pQueryGivenLatent)
          Take a step of the expectation-maximization algorithm for computing the probability of the query given each latent variable.
 
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

termCount

protected int termCount
The number of terms.


latentCount

protected int latentCount
The number of latent variables.


latents

protected ProbabilisticLatentSemanticAnalysis.LatentData[] latents
The latent variable data.


maxIterations

protected int maxIterations
The maximum number of iterations for the E-M evaluation.


minimumChange

protected double minimumChange
The minimum change in log-likelihood for the E-M evaluation.

Constructor Detail

ProbabilisticLatentSemanticAnalysis.Result

public ProbabilisticLatentSemanticAnalysis.Result(int termCount,
                                                  ProbabilisticLatentSemanticAnalysis.LatentData[] latents)
Creates a new probabilistic latent semantic analysis transform.

Parameters:
termCount - The number of terms.
latents - The latent variable data.
Method Detail

evaluate

public Vector evaluate(Vectorizable input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<Vectorizable,Vector>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.

step

protected double step(Vector query,
                      Matrix pLatentGivenQueryTerm,
                      Vector pQueryGivenLatent)
Take a step of the expectation-maximization algorithm for computing the probability of the query given each latent variable.

Parameters:
query - The query to evaluate.
pLatentGivenQueryTerm - The probability of each latent variable given each term in the query.
pQueryGivenLatent - The probability of the query given each latent variable.
Returns:
The log-likelihood of the query.

getInputDimensionality

public int getInputDimensionality()
Description copied from interface: VectorInputEvaluator
Gets the expected dimensionality of the input vector to the evaluator, if it is known. If it is not known, -1 is returned.

Specified by:
getInputDimensionality in interface VectorInputEvaluator<Vectorizable,Vector>
Returns:
The expected dimensionality of the input vector to the evaluator, or -1 if it is not known.

getOutputDimensionality

public int getOutputDimensionality()
Description copied from interface: VectorOutputEvaluator
Gets the expected dimensionality of the output vector of the evaluator, if it is known. If it is not known, -1 is returned.

Specified by:
getOutputDimensionality in interface VectorOutputEvaluator<Vectorizable,Vector>
Returns:
The expected dimensionality of the output vector of the evaluator, or -1 if it is not known.