Ann Unit V
Ann Unit V
UNIT-V
Self-Organization Feature
By
Dr.Satyabrata Dash
Assistant Professor
Department of Computer Science and
Engineering, GITAM Deemed to be
University
Course Objectives( ANN)
1. To understand the architecture, learning algorithm and issues of various neural
networks.
2. Analyze ANN learning, Error correction learning, Memory-based learning,
Competitive learning and Boltzmann learning
3. To adopt gradient - descent techniques in real time applications
4. Provide knowledge on Generalization and function approximation and various
5. architectures of building an ANN
6. Implement and learn the applications of Self-organization Map
2
SYLLABUS
3
SYLLABUS
4
Dimensionality Reduction:
1. Handling the high-dimensional data is very difficult in practice, commonly known as the curse of
dimensionality.
2. If the dimensionality of the input dataset increases, any machine learning algorithm and model
becomes more complex.
3. As the number of features increases, the number of samples also gets increased proportionally,
and the chance of over fitting also increases.
4. If the machine learning model is trained on high-dimensional data, it becomes over fitted and
results in poor performance.
5. Hence, it is often required to reduce the number of features, which can be done with
dimensionality reduction.
1. Standardize the data: PCA assumes that the data is centered at zero and has unit variance.
Therefore, the data should be standardized before applying PCA.
2. Compute the covariance matrix: The covariance matrix describes the relationships between the
features in the dataset.
3. Compute the eigenvectors and eigenvalues of the covariance matrix: The eigenvectors represent
the principal components, and the eigenvalues represent the variance of the dataset along each
principal component.
4. Sort the eigenvectors in descending order of their corresponding eigenvalues: This determines
the order of importance of the principal components.
5. Select the top k eigenvectors: The top k eigenvectors with the highest eigenvalues are chosen to
represent the dataset in the lower-dimensional space.
6. Transform the data into the lower-dimensional space: The dataset is projected onto the selected
k principal components to obtain a lower-dimensional representation of the data.
Scikit-learn is a popular Python library for machine learning, and it provides a simple and efficient
implementation of PCA. Here's how you can use scikit-learn to perform PCA on a dataset:
• Load a dataset:
• iris = load_iris()
• X = iris.data
• y = iris.target
• pca = PCA(n_components=2)
• This creates a PCA object that will reduce the dimensionality of the data to 2 components.
• X_pca = pca.fit_transform(X)
• This fits the PCA model to the data and transforms the data into the lower-dimensional subspace.
This plots the data in the lower-dimensional subspace, with each point colored according to its class
label.
That's it! This is a simple example of how to use PCA in scikit-learn. Of course, there are many more
options and parameters you can use to customize the PCA model, so be sure to check out the scikit-
learn documentation for more information.
14
Learning and Types of Learning rules in ANN
Learning rule is a method or a mathematical logic.
• Neural Network to learn from the existing conditions and improve its performance.
• Applying learning rule is an iterative process.
There are different learning rules in the Neural network:
16
Self-organization Feature Maps, (Kohenen Self
Organization Networks )
17
Self-organization Feature Maps, (Kohenen Self
Organization Networks )
1. All the nodes on this grid are connected directly to the input vector, but not to one
another, meaning the nodes do not know the values of their neighbours, and only
update the weight of their connections as a function of the given inputs.
18
Self-organization Feature Maps, (Kohenen Self
Organization Networks )
1. The grid itself is the map that organises itself at each iteration as a function of the
input of the input data. As such, after clustering, each node has its own (i,j)
coordinate, which allows one to calculate the Euclidean distance between 2 nodes
by means of the Pythagorean theorem.
2. A Self-Organizing Map utilizes competitive learning instead of error-correction
learning, to modify its weights. It implies that only an individual node is activated
at each cycle in which the features of an occurrence of the input vector are
introduced to the neural network
3. The selected node- the Best Matching Unit (BMU) is selected according to the
similarity between the current input values and all the other nodes in the network.
19
Self-organization Feature Maps, (Kohenen Self
Organization Networks )
Step 1 − Initialize the weights, the learning rate α and the neighbourhood topological
scheme.
Step 2 − Continue step 3-9, when the stopping condition is not true.
Step 3 − Continue step 4-6 for every input vector x.
Step 4 − Calculate Square of Euclidean Distance for j = 1 to m
𝑛 𝑚
20
Self-organization Feature Maps, (Kohenen Self
Organization Networks )
21
Application of SOM.
• Data Visualization
• Clustering
• Anomaly Detection
• Dimensionality Reduction
• Pattern Recognition
22
Learning Vector Quantization,
23
Architecture Learning Vector Quantization,
• Architecture of LVQ which is quite similar to the architecture of KSOM. As we can see, there
are “n” number of input units and “m” number of output units. The layers are fully
interconnected with having weights on them.
24
Learning Vector Quantization,
Parameters Used
Following are the parameters used in LVQ training process as well as in the flowchart
x = training vector (x1,...,xi,...,xn)
T = class for training vector x
wj = weight vector for jth output unit
Cj = class associated with the jth output unit
25
Learning Vector Quantization,
Training Algorithm
Step 1 − Initialize reference vectors, which can be done as follows
From the given set of training vectors, take the first “m” number of clusters, training
vectors and use them as weight vectors. The remaining vectors can be used for training.
Assign the initial weight and perform classification randomly.
Apply K-means clustering method.
26
Learning Vector Quantization,
27
Learning Vector Quantization,
(Flow Chat)
28
Maximal Eigenvector Filtering,
29
Thank You
30