Creates a new HebbianSolver with the default to do the updating work, and the default
to check for convergence in a (single)
background thread, with
convergenceTarget set to 0, which means that the solver will not really care about convergence as a loop-exiting
criterion (but will be checking for convergence anyways, so it will be logged and singular values will be
saved).
Creates a new HebbianSolver with the default to do the updating work, and the default
to check for convergence in a (single)
background thread, with
convergenceTarget set to 0, which means that the solver will not really care about convergence as a loop-exiting
criterion (but will be checking for convergence anyways, so it will be logged and singular values will be
saved).
the exact number of times the verifier will check convergence status in the background before the solver will move on to the next eigen-vector.
Creates a new HebbianSolver with the default to do the updating work, and the default
to check for convergence in a (single)
background thread, with
maxPassesPerEigen set to Integer.MAX_VALUE.
Creates a new HebbianSolver with the default to do the updating work, and the default
to check for convergence in a (single)
background thread, with
maxPassesPerEigen set to Integer.MAX_VALUE. Not recommended unless only looking
for the first few (5, maybe 10?) singular
vectors, as small errors which compound early on quickly put a minimum error on subsequent vectors.
a small "epsilon" value which tells the solver how small you want the cosine of the angle between a proposed eigenvector and that same vector after being multiplied by the (square of the) input corpus
This is the recommended constructor to use if you're not sure
Creates a new HebbianSolver with the default to do the updating work, and the default
to check for convergence in a
(single) background thread.
This is the recommended constructor to use if you're not sure
Creates a new HebbianSolver with the default to do the updating work, and the default
to check for convergence in a
(single) background thread.
a small "epsilon" value which tells the solver how small you want the cosine of the angle between a proposed eigenvector and that same vector after being multiplied by the (square of the) input corpus
a cutoff which tells the solver after how many times of checking for convergence (done by the verifier) should the solver stop trying, even if it has not reached the convergenceTarget.
Creates a new HebbianSolver with maxPassesPerEigen = Integer.MAX_VALUE (i.e.
Creates a new HebbianSolver with maxPassesPerEigen = Integer.MAX_VALUE (i.e. keep on iterating until convergenceTarget is reached). Not recommended unless only looking for the first few (5, maybe 10?) singular vectors, as small errors which compound early on quickly put a minimum error on subsequent vectors.
EigenUpdater
used to do the actual work of iteratively updating the current "best guess"
singular vector one data-point presentation at a time.
an object which perpetually tries to check how close to
convergence the current singular vector is (typically is a
which does this
in the background in another thread, while the main thread continues to converge)
a small "epsilon" value which tells the solver how small you want the cosine of the angle between a proposed eigenvector and that same vector after being multiplied by the (square of the) input corpus
EigenUpdater
used to do the actual work of iteratively updating the current "best guess"
singular vector one data-point presentation at a time.
an object which perpetually tries to check how close to
convergence the current singular vector is (typically is a
which does this
in the background in another thread, while the main thread continues to converge)
a small "epsilon" value which tells the solver how small you want the cosine of the angle between a proposed eigenvector and that same vector after being multiplied by the (square of the) input corpus
a cutoff which tells the solver after how many times of checking for convergence (done by the verifier) should the solver stop trying, even if it has not reached the convergenceTarget.
Uses the to check for convergence
the purported singular vector whose convergence is being checked
the corpus to check against
contains the previous eigens, various other solving state TrainingState
true if either we have converged, or maxPassesPerEigen has been exceeded.
Primary singular vector solving method.
Primary singular vector solving method.
input matrix to find singular vectors of. Needs not be symmetric, should probably be sparse (in
fact the input vectors are not mutated, and accessed only via dot-products and sums, so they should be
the number of singular vectors to find (in roughly decreasing order by singular value)
the final of the solver, after desiredRank singular vectors (and approximate
singular values) have been found.
The Hebbian solver is an iterative, sparse, singular value decomposition solver, based on the paper Generalized Hebbian Algorithm for Latent Semantic Analysis (2005) by Genevieve Gorrell and Brandyn Webb (a.k.a. Simon Funk). TODO: more description here! For now: read the inline comments, and the comments for the constructors.