Class NeuralMap
java.lang.Object
smile.vq.NeuralMap
- All Implemented Interfaces:
Serializable, VectorQuantizer
NeuralMap is an efficient competitive learning algorithm inspired by growing
neural gas and BIRCH. Like growing neural gas, NeuralMap has the ability to
add and delete neurons with competitive Hebbian learning. Edges exist between
neurons close to each other. Such edges are intended placeholders for
localized data distribution. Such edges also help to locate distinct clusters
(those clusters are not connected by edges).
- See Also:
-
Field Summary
Fields inherited from interface VectorQuantizer
OUTLIER -
Constructor Summary
ConstructorsConstructorDescriptionNeuralMap(double r, double epsBest, double epsNeighbor, int edgeLifetime, double beta) Constructor. -
Method Summary
-
Constructor Details
-
NeuralMap
public NeuralMap(double r, double epsBest, double epsNeighbor, int edgeLifetime, double beta) Constructor.- Parameters:
r- the distance threshold to activate the nearest neuron of a signal.epsBest- the learning rate to update activated neuron.epsNeighbor- the learning rate to update neighbors of activated neuron.edgeLifetime- the maximum age of edges.beta- decrease the freshness of all neurons by multiply them with beta.
-
-
Method Details
-
update
public void update(double[] x) Description copied from interface:VectorQuantizerUpdate the codebook with a new observation.- Specified by:
updatein interfaceVectorQuantizer- Parameters:
x- a new observation.
-
neurons
-
clear
public void clear(double eps) Removes staled neurons and the edges beyond lifetime. Neurons without emanating edges will be removed too.- Parameters:
eps- the freshness threshold of neurons. It should be a small value (e.g. 1E-7).
-
quantize
public double[] quantize(double[] x) Description copied from interface:VectorQuantizerQuantize a new observation. Returns Optional.empty if the observation is noise.- Specified by:
quantizein interfaceVectorQuantizer- Parameters:
x- a new observation.- Returns:
- the quantized vector.
-