Professional Documents
Culture Documents
An input data of size (m, n) where m is the number of training examples and n is
the number of features in each example. First, it initializes the weights of size (n,
C) where C is the number of clusters. Then iterating over the input data, for each
training example, it updates the winning vector (weight vector with the shortest
distance (e.g Euclidean distance) from training example). Weight updating rule is
given by :
Algorithm
Training:
Step 1: Initialize the weights wij random value may be assumed. Initialize the
learning rate α.
Step 2: Calculate squared Euclidean distance.
D(j) = Σ (wij – xi)^2 where i=1 to n and j=1 to m
Step 3: Find index J, when D(j) is minimum that will be considered as winning
index.
Step 4: For each j within a specific neighborhood of j and for all i, calculate the
new weight.
wij(new)=wij(old) + α[xi – wij(old)]
Step 5: Update the learning rule by using :
α(t+1) = 0.5 * t
Step 6: Test the Stopping Condition.
Let’s say that an input data of size ( m, n ) where m is the number of training
examples and n is the number of features in each example and a label vector of
size ( m, 1 ). First, it initializes the weights of size ( n, c ) from the first c number
of training samples with different labels and should be discarded from all training
samples. Here, c is the number of classes. Then iterate over the remaining input
data, for each training example, it updates the winning vector ( weight vector
with the shortest distance ( e.g Euclidean distance ) from the training example ).
The weight updation rule is given by:
if correctly classified:
wij(new) = wij(old) + alpha(t) * (xik - wij(old))
else:
wij(new) = wij(old) - alpha(t) * (xik - wij(old))
where alpha is a learning rate at time t, j denotes the winning vector, i denotes the
ith feature of training example and k denotes the kth training example from the
input data. After training the LVQ network, trained weights are used for
classifying new examples. A new example is labeled with the class of the
winning vector.
Weight Update: After determining the BMU, the weights of the BMU and its
neighboring neurons are updated. Typically, a neighborhood function is used to
determine which neurons are considered neighbors and to what extent they will be
updated. The purpose of updating the weights is to bring the BMU and its
neighbors closer to the input data point. Over time, this process results in the
SOM's weight vectors becoming more aligned with the input data distribution.
Learning Rate: The learning rate is a parameter that controls the magnitude of
weight adjustments during training. Initially, the learning rate is set to a relatively
high value, and it gradually decreases over time. This schedule ensures that the
SOM converges to a stable representation of the data.
Neighborhood Function: The neighborhood function defines the spatial extent over
which neurons' weights are updated. It starts with a larger radius and gradually
shrinks during training. Neurons close to the BMU have their weights updated
more significantly, while those farther away are updated to a lesser extent. This
mechanism helps the SOM organize the input data in a spatially meaningful way.
The Mexican Hat wavelet, or the LoG function, is a two-dimensional spatial filter
that is characterized by a positive central peak and a surrounding ring of negative
values. It looks like a sombrero or "Mexican hat," hence the name. This wavelet is
used to highlight edges and transitions in images and is particularly effective at
detecting fine details and patterns.
In the context of neural networks, Mexican Hat networks are designed to apply the
principles of this wavelet to process image data. Here are some key features of
Mexican Hat networks:
Convolutional Layers: Mexican Hat networks typically use convolutional layers to
apply the Mexican Hat wavelet to the input image. Convolution involves sliding a
small filter (the Mexican Hat wavelet) across the image and computing the dot
product between the filter and the image at each position.
Edge Detection: Mexican Hat wavelets are good at detecting edges in images
because they respond strongly to areas of rapid intensity change. The positive
central peak highlights edges, while the negative ring suppresses noise and
enhances the edge structure.
Feature Extraction: Mexican Hat networks can be used to extract relevant features
from images, making them useful for tasks like texture analysis and pattern
recognition. These networks can be customized by adjusting the size and shape of
the Mexican Hat wavelet.
Tunable Parameters: Mexican Hat networks allow for the adjustment of parameters
like the size of the central peak and the width of the surrounding ring. These
parameters control the sensitivity to edge details and the extent of noise
suppression.
It's worth noting that Mexican Hat networks are not as commonly used as
traditional convolutional neural networks (CNNs) in modern computer vision
tasks. CNNs have shown significant success in a wide range of applications and
have become the go-to choice for many image-related tasks. However, Mexican
Hat networks can still be useful in specific scenarios where fine-grained edge
detection and feature extraction are essential.
Cooperative Process:
Once the BMU is determined, the cooperative process comes into play as
neighboring neurons also adapt their weights based on the input. These
neighboring neurons are determined by a neighborhood function, typically a
Gaussian function, which defines the extent of cooperation.
Neurons closer to the BMU cooperate more with the BMU and undergo more
significant weight adjustments. This cooperation among neighboring neurons helps
the SOM capture the global and local structure of the input data.
Adaptive Process:
The adaptive process in SOM refers to the adjustment of neuron weights based on
the input data. After identifying the BMU and its neighbors, the weights of these
neurons are updated to become more similar to the input data. The degree of
weight adjustment depends on the learning rate, which decreases over time.
The learning rate controls the size of weight updates. It starts with a relatively high
value and gradually decreases as training progresses. This adaptive learning rate
allows the SOM to converge and stabilize its representation of the data.
Additionally, the adaptive process may involve other factors, such as the
adaptation of the neighborhood size (the spatial extent over which neurons
cooperate and adapt). The neighborhood size typically shrinks as training proceeds,
which leads to a finer level of organization as the network converges.
Cooperative and adaptive processes work hand in hand to ensure that a SOM
creates a meaningful topological representation of the input data. The competitive
process identifies the most relevant neurons for a given input, while the
cooperative process helps the network to organize the data in a spatially
meaningful way by considering neighboring neurons. The adaptive process fine-
tunes the weights of these neurons to align them with the input distribution,
gradually refining the map's representation.