public class GrowingNeuralGas extends java.lang.Object implements Clustering<double[]>
Compared to Neural Gas, GNG has the following distinctions:
| Modifier and Type | Class and Description |
|---|---|
static class |
GrowingNeuralGas.Neuron
The neuron vertex in the growing neural gas network.
|
OUTLIER| Constructor and Description |
|---|
GrowingNeuralGas(int d)
Constructor.
|
GrowingNeuralGas(int d,
double epsBest,
double epsNeighbor,
int maxEdgeAge,
int lambda,
double alpha,
double beta)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
GrowingNeuralGas.Neuron[] |
neurons()
Returns the neurons in the network.
|
void |
partition(int k)
Clustering neurons into k clusters.
|
int |
predict(double[] x)
Cluster a new instance to the nearest neuron.
|
void |
update(double[] x)
Update the Neural Gas with a new signal.
|
public GrowingNeuralGas(int d)
d - the dimensionality of signals.public GrowingNeuralGas(int d,
double epsBest,
double epsNeighbor,
int maxEdgeAge,
int lambda,
double alpha,
double beta)
d - the dimensionality of signals.epsBest - the fraction to update nearest neuron.epsNeighbor - the fraction to update neighbors of nearest neuron.maxEdgeAge - the maximum age of edges.lambda - if the number of input signals so far is an integer multiple
of lambda, insert a new neuron.alpha - decrease error variables by multiplying them with alpha
during inserting a new neuron.beta - decrease all error variables by multiply them with beta.public GrowingNeuralGas.Neuron[] neurons()
public void update(double[] x)
public void partition(int k)
k - the number of clusters.public int predict(double[] x)
predict in interface Clustering<double[]>x - a new instance.