Beginner’s Guide To Kohonen Map

Patient Tools

Read, save, and share this guide

Use these quick tools to make this medical article easier to read, print, save, or share with a family member.

On this page15 sections

Article Summary

The concept of a self-organizing map, or SOM, was first put forth by Kohonen. It is a way to reduce data dimensions since it is an unsupervised neural network that is trained using unsupervised learning techniques to build a low-dimensional, discretized representation from the input space of the training samples. This representation is known as a map. In this article, we will be going through a Beginner’s...

Key Takeaways

  • This article explains What Are Self-Organizing Maps? in simple medical language.
  • This article explains How Do SOMs Work? in simple medical language.
  • This article explains Uses of Self-Organizing Maps in simple medical language.
  • This article explains Self-Organizing Maps Architecture in simple medical language.
Before reading

RX Patient Tools

Use these quick guides before reading the article, or return to them when you need help preparing questions for a doctor.

Start here Choose the right pathway for symptoms, reports, medicines, or urgent warning signs. Disease article roadmap Read this topic step by step: meaning, symptoms, warning signs, diagnosis, treatment, prevention, and follow-up. Treatment planner Prepare questions about treatment choices, benefits, risks, side effects, and follow-up. Family & caregiver guide Organize symptoms, reports, medicines, questions, and follow-up safely. Nutrition & diet guide Prepare food, hydration, supplement, and medicine-timing questions safely. Prevention guide Organize risk factors, protective habits, screening, and warning signs. Recovery guide Prepare a safe plan for activity, rehabilitation, warning signs, and follow-up.
Educational health guideWritten for patient understanding and clinical awareness.
Reviewed content workflowUse writer and reviewer profiles for stronger trust.
Emergency safety firstUrgent warning signs are highlighted below.
Definition

The concept of a self-organizing map, or SOM, was first put forth by Kohonen. It is a way to reduce data dimensions since it is an unsupervised neural network that is trained using unsupervised learning techniques to build a low-dimensional, discretized representation from the input space of the training samples. This representation is known as a map.

In this article, we will be going through a Beginner’s guide to a popular Self Organizing Map – The Kohonen Map. We will start with understanding what Self-Organizing Maps are.

What Are Self-Organizing Maps?

A sort of artificial neural network called a self-organizing map, often known as a Kohonen map or SOM, was influenced by 1970s neural systems’ biological models. It employs an unsupervised learning methodology and uses a competitive learning algorithm to train its network. To minimize complex issues for straightforward interpretation, SOM is utilized for mapping and clustering (or dimensionality reduction) procedures to map multidimensional data onto lower-dimensional spaces. The output layer and the input layer are the two layers that make up the SOM. This is also known as the Kohonen Map.

Now that we have discussed what SOMs are, we will now be discussing how the Kohonen Maps work.

How Do SOMs Work?

Consider an input set with the dimensions (m, n), where m represents n represents the number of features present in each example and the number of training examples. The weights of size (n, C), where C is the number of clusters, are first initialized. The winning vector (the weight vector with the shortest distance from the training example, for example, the Euclidean distance) is then updated after iterating over the input data for each training example. Weight update guidelines are provided by:

wij = wij(old) + alpha(t) *  (xik – wij(old))

Here, i stands for the ith feature of the training example, j is the winning vector, alpha is the learning rate at time t, and k is the input data’s kth training example. The SOM network is trained, and trained weights are utilized to cluster new examples. A new example is included in the collection of successful vectors.

Algorithm

The involved actions are:

  • Step 1: Initialize each node weight’s w_ij to a random value.
  • Step 2: Select input vector x k at random.
  • Step 3: For each node on the map, repeat steps 4 and 5 once more.
  • Step 4: Find the distance in Euclid between the input vector x(t), and the weight vector wij connected to the first node, where t, i, and j are all equal to 0.
  • Step 5: Keep an eye on the node that produces the least t-distance.
  • Step 6: Make a global Best Matching Unit calculation (BMU). It refers to the node that is closest to all other calculated nodes.
  • Step 7: Find the BMU’s topological neighborhood and its in the Kohonen Map.

Note: Steps 2 through 9 represent the training phase, whereas step 1 represents the initiation phase.

Here,

X → input vector

The neighborhood function’s radius, o(t), determines how far neighbor nodes in the 2D grid are inspected when updating vectors. Over time, it gradually gets smaller.

w_ij → is the association weight between grid nodes I j.

t → current iteration

At iteration t, X(t) equals the input vector instance.

i → is the grid’s row coordinate for nodes.

w → Weight vector

The neighborhood function, which represents the distance between nodes I j and the BMU, is β_ij.

j → is the grid’s column coordinate for nodes.

Let us now discuss the various uses of Self-Organizing or Kohonen Maps.

Uses of Self-Organizing Maps

Self-organizing maps, which are not always linear, have the advantage of keeping the structural information from the training data intact. Principal Component Analysis may simply result in data loss when used to high dimensional data when the dimension is decreased to two. Self-organizing maps can be a great alternative to PCA for the reduction in dimensionality if the data has several dimensions and each preset dimension is relevant. Groups are created through seismic facies analysis based on the detection of various individual features. Using this technique, organized relational clusters are created by identifying feature organizations in the dataset.

We will now discuss the architecture of Self-Organizing or Kohonen Maps.

Self-Organizing Maps Architecture

Two crucial layers make up self-organizing maps: the input layer and the output layer, commonly referred to as a feature map. The input layer is the initial layer in a self-organizing map. Every dataset’s data point competes for a representation in order to recognize itself. The initialization of the weight to vectors initiates the mapping processes of the Self-Organizing Maps.

The mapped vectors are then examined to determine which weight most accurately represents the chosen sample using a sample random vector. Neighboring weights that are near each weighted vector are present. The chosen weight is allowed to turn into a vector for a random sample. This encourages the map to develop and take on new forms. In a 2D feature space, they typically form hexagonal or square shapes. More than 1,000 times are spent repeatedly performing this entire process.

To put it simply, learning takes place in the following ways:

  • To determine whether appropriate weights are similar to the input vector, each node is analyzed. The best matching unit is the term used to describe the appropriate node.
  • The Best Matching Unit’s neighborhood value is then determined. Over time, the neighbors tend to decline in number.
  • The appropriate weight further evolves into something more resembling the sample vector. The surrounding areas change similarly to the selected sample vector. A node’s weights change more as it gets closer to the Best Matching Unit (BMU), and less as it gets farther away from its neighbor.
  • For N iterations, repeat step two.

Now, we will be exploring the pros and cons of the Self-Organizing Maps or Kohonen Maps.

Pros And Cons Of Self-Organizing Maps

Self-organizing maps have both advantages and disadvantages, some of which are shown below:

Pros

  • Techniques like dimensionality reduction and grid clustering can make it simple to understand and comprehend data.
  • Self-organizing maps can handle a variety of categorization issues while simultaneously producing an insightful and practical summary of the data.

Cons

  • The model cannot grasp how data is formed since it does not generate a generative data model.
  • When dealing with categorical data, Self-Organizing Maps perform poorly, and when dealing with mixed forms of data, they do much worse.
  • In comparison, the model preparation process is extremely slow, making it challenging to train against slowly evolving data.

Let us now deal with the implementation of the Self-Organizing Maps in Python.

Implementing Self-Organizing Maps Using Python

Self-Organizing Maps can be quickly implemented in Python by using Numpy with the MiniSom package. We will explore how to cluster the seed data set using MiniSom in the below example.

!pip install minisom

from minisom import MiniSom

# defining training and neurons

neurons_a = 9

neurons_b = 9

som = MiniSom(neurons_a, neurons_b, neighborhood_function=’gaussian’, data.shape[1], random_seed=0, learning_rate=.5, sigma=1.5)

som.pca_weights_init(data)

som.train(data, 1000, verbose=True)

Plotting the distance map or the U-Matrix using a pseudocolor, where the neurons included in the maps are displayed as cells array and the color denotes the weighted distance from the neighboring neurons, allows us to see the results of our training. We can also add markers that reflect the samples that were mapped into the particular cells on top of the fake color.

A scatter chart, where each dot indicates the location of the winning neuron, can be used to visualize how the samples are scattered around the map. To prevent points within a cell from overlapping, an offset that is random can be introduced.

Another pseudocolor graphic reflecting the neural activity frequencies can be made to reveal which map neurons are active more frequently:

plt.figure(figsize=(7, 7))

frequencies = som.activation_response(data)

plt.pcolor(frequencies.T, cmap=’Blues’)

plt.colorbar()

plt.show()

Our Learners Also Ask:

Here are some general FAQs on Self-Organizing or Kohonen Maps:

1. What are self-organizing maps used for?

In most cases, a high-dimensional dataset is represented as a two-dimensional discretized pattern using self-organizing maps or Kohonen maps.

2. What is an example of self-organizing maps?

A self-organizing map displaying the voting trends in the US Congress. Each member of Congress had a row in the input data database, and columns for specific votes contained each member’s yes/no/abstain vote. These members were sorted in a 2D grid by the SOM method, with related members clustered closer together.

3. What is the advantage of self-organizing maps when compared to neural networks?

The primary benefit of employing a SOM is that the data is simple to read and comprehend. Grid clustering and the decrease of dimensionality make it simple to spot patterns in the data.

4. What are the five stages in a Self Organizing map?

The five stages in a Self Organizing Map or Kohonen Map are:

  • Initialization
  • Sampling
  • Matching
  • Updating
  • Continuation

Master Self-Organizing Maps With Simplilearn

Self-organizing maps are distinctive in and of themselves and offer us a broad range of applications in the fields of Deep Learning and Artificial Neural Networks. It is a technique for unsupervised clustering that projects data into a lower grid dimension, making it very beneficial for dimensionality reduction. Clustering techniques can be easily implemented, thanks to their distinctive training architecture.

In this article, we discussed what are Self-organizing Maps or Kohonen Maps, their working, uses, and architecture. Further, we discussed their pros and cons and implementation in Python as well. To dive deeper into Kohonen Maps and learn various other concepts related to Machine Learning in-depth, check out Simplilearn’s AI and ML Course.

Doctor visit helper

Prepare before seeing a doctor

A simple rural-patient checklist to help you explain symptoms clearly, ask better questions, and avoid unsafe self-treatment.

Safety note: This is not a prescription or diagnosis. For severe symptoms, pregnancy danger signs, children with serious illness, chest pain, breathing difficulty, stroke-like weakness, or major injury, seek urgent care.

Which doctor may help?

Start with a registered doctor or the nearest qualified health center.

What to tell the doctor

  • Write when the problem started and how it changed.
  • Bring old prescriptions, investigation reports, and current medicines.
  • Write allergies, pregnancy status, diabetes, kidney/liver disease, and major past illnesses.
  • Bring one family member if the patient is weak, elderly, confused, or a child.

Questions to ask

  • What is the most likely cause of my symptoms?
  • Which danger signs mean I should go to hospital quickly?
  • Which tests are necessary now, and which can wait?
  • How should I take medicines safely and what side effects should I watch for?
  • When should I come for follow-up?

Tests to discuss

  • Vital signs: temperature, pulse, blood pressure, oxygen saturation
  • Basic physical examination by a clinician
  • CBC, urine test, blood sugar, or imaging only when clinically needed

Avoid these mistakes

  • Do not use antibiotics, steroid tablets/injections, or strong painkillers without proper medical advice.
  • Do not hide pregnancy, kidney disease, ulcer, allergy, or blood thinner use.
  • Do not delay emergency care when danger signs are present.

Medicine safety and first-aid guide

This section is for patient education only. It does not replace a doctor, pharmacist, or emergency care.

Safe first steps

  • Avoid heavy lifting, sudden bending, and prolonged bed rest.
  • Use comfortable posture and gentle movement as tolerated.
  • Discuss physiotherapy, X-ray, or MRI only when clinically needed.

OTC medicine safety

  • For mild back pain, pain-relief medicine may be discussed with a doctor or pharmacist.
  • Avoid repeated painkiller use if you have kidney disease, stomach ulcer, uncontrolled blood pressure, or are taking blood thinners.

Avoid these mistakes

  • Do not start antibiotics without a proper medical decision.
  • Do not use steroid tablets or injections casually for quick relief.
  • Do not delay emergency care because of home remedies.

Get urgent help if

  • Back pain with leg weakness, numbness around private area, loss of urine/stool control, fever, cancer history, or major injury needs urgent care.
Medicine names, dose, and timing must be decided by a qualified clinician or pharmacist after checking age, pregnancy, allergy, other diseases, and current medicines.

For rural patients and family caregivers

Patient health record and symptom diary

Write your symptoms, medicines already taken, test results, and questions before visiting a doctor. This note stays on your device unless you print or copy it.

Doctor to discuss: Doctor / qualified healthcare provider
Tests to discuss with doctor
  • Basic vital signs: temperature, pulse, blood pressure, oxygen level if needed
  • Relevant blood, urine, imaging, or specialist tests only after clinical assessment
Questions to ask
  • What is the most likely cause of my symptoms?
  • Which warning signs mean I should go to emergency care?
  • Which tests are really needed now?
  • Which medicines are safe for my age, pregnancy status, allergy, kidney/liver/stomach condition, and current medicines?

Emergency warning signs such as chest pain, severe breathing difficulty, sudden weakness, confusion, severe dehydration, major injury, or loss of bladder/bowel control need urgent medical care. Do not wait for online information.

Safe pathway to proper treatment

Care roadmap for: Beginner’s Guide To Kohonen Map

Use this simple roadmap to understand the next safe steps. It is educational and does not replace examination by a doctor.

Go to emergency care if you notice:
  • Severe or rapidly worsening symptoms
  • Breathing difficulty, chest pain, fainting, confusion, severe weakness, major injury, or severe dehydration
Doctor / service to discuss: Qualified healthcare provider; specialist depends on symptoms and examination.
  1. Step 1

    Check danger signs first

    If danger signs are present, seek emergency care and do not wait for online information.

  2. Step 2

    Record the symptom story

    Write when symptoms started, severity, medicines already taken, allergies, pregnancy status, and test results.

  3. Step 3

    Visit a qualified clinician

    A doctor, nurse, or qualified healthcare provider can examine you and decide which tests or treatment are needed.

  4. Step 4

    Do only useful tests

    Do tests after clinical assessment. Avoid unnecessary tests, random antibiotics, or repeated medicines without diagnosis.

  5. Step 5

    Follow up and return early if worse

    If symptoms worsen, new warning signs appear, or treatment is not helping, return for review quickly.

Rural patient practical tips
  • Take a written symptom diary and all previous prescriptions/test reports.
  • Do not hide medicines already taken, even herbal or over-the-counter medicines.
  • Ask which warning signs mean urgent referral to hospital.

This roadmap is for education. A real diagnosis and treatment plan requires history, examination, and clinical judgment.

Internal learning pathway

Explore related RX articles

Related guides from RX Harun are grouped to help readers move from overview to symptoms, tests, treatment, and safe next steps.

Rx Data Science and Artificial Intelligence
  1. Semantic Chunks for RAG DefinitionIn order to abide by the context window of the LLM , we usually break text…
  2. RAG Evaluation and Meta-Evaluation with GroUSE DefinitionThis tutorial introduces GroUSE, a framework for evaluating Retrieval-Augmented Generation (RAG) pipelines, focusing on the final…
  3. Deep Evaluation of RAG Systems using deepeval DefinitionThis code demonstrates the use of the deepeval library to perform comprehensive evaluations of Retrieval-Augmented Generation (RAG) systems.…
  4. Simple RAG with Llamaindex DefinitionThis code implements a basic Retrieval-Augmented Generation (RAG) system for processing and querying PDF document(s). The…
  5. Simple RAG (Retrieval-Augmented Generation) System DefinitionThis code implements a basic Retrieval-Augmented Generation (RAG) system for processing and querying PDF documents. The…
  6. Simple RAG (Retrieval-Augmented Generation) System for CSV Files DefinitionThis code implements a basic Retrieval-Augmented Generation (RAG) system for processing and querying CSV documents. The…