public static class ProbabilisticLatentSemanticAnalysis.Result extends AbstractCloneableSerializable implements Evaluator<Vectorizable,Vector>, VectorInputEvaluator<Vectorizable,Vector>, VectorOutputEvaluator<Vectorizable,Vector>
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Result(int termCount,
ProbabilisticLatentSemanticAnalysis.LatentData[] latents)
Creates a new probabilistic latent semantic analysis transform.
|
Modifier and Type | Method and Description |
---|---|
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.
|
clone
protected int termCount
protected int latentCount
protected ProbabilisticLatentSemanticAnalysis.LatentData[] latents
protected int maxIterations
protected double minimumChange
public Result(int termCount, ProbabilisticLatentSemanticAnalysis.LatentData[] latents)
termCount
- The number of terms.latents
- The latent variable data.public Vector evaluate(Vectorizable input)
Evaluator
evaluate
in interface Evaluator<Vectorizable,Vector>
input
- The input to evaluate.protected double step(Vector query, Matrix pLatentGivenQueryTerm, Vector pQueryGivenLatent)
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.public int getInputDimensionality()
VectorInputEvaluator
getInputDimensionality
in interface VectorInputEvaluator<Vectorizable,Vector>
public int getOutputDimensionality()
VectorOutputEvaluator
getOutputDimensionality
in interface VectorOutputEvaluator<Vectorizable,Vector>