gha

fun gha(data: Array<DoubleArray>, w: Array<DoubleArray>, r: TimeFunction): GHA

Generalized Hebbian Algorithm. GHA is a linear feed-forward neural network model for unsupervised learning with applications primarily in principal components analysis. It is single-layer process -- that is, a synaptic weight changes only depending on the response of the inputs and outputs of that layer.

It guarantees that GHA finds the first k eigenvectors of the covariance matrix, assuming that the associated eigenvalues are distinct. The convergence theorem is forumulated in terms of a time-varying learning rate η. In practice, the learning rate η is chosen to be a small constant, in which case convergence is guaranteed with mean-squared error in synaptic weights of order η.

It also has a simple and predictable trade-off between learning speed and accuracy of convergence as set by the learning rate parameter η. It was shown that a larger learning rate η leads to faster convergence and larger asymptotic mean-square error, which is intuitively satisfying.

Compared to regular batch PCA algorithm based on eigen decomposition, GHA is an adaptive method and works with an arbitrarily large sample size. The storage requirement is modest. Another attractive feature is that, in a nonstationary environment, it has an inherent ability to track gradual changes in the optimal solution in an inexpensive way.

====References:====

  • Terence D. Sanger. Optimal unsupervised learning in a single-layer linear feedforward neural network. Neural Networks 2(6):459-473, 1989.

  • Simon Haykin. Neural Networks: A Comprehensive Foundation (2 ed.). 1998.

Parameters

data

training data.

w

the initial projection matrix.

r

the learning rate.


fun gha(data: Array<DoubleArray>, k: Int, r: TimeFunction): GHA

Generalized Hebbian Algorithm with random initial projection matrix.

Parameters

data

training data.

k

the dimension of feature space.

r

the learning rate.