Learning Vector Quantization17 Mar 2025 | 3 min read Learn Vector Quantization (or LVQ) is a type of Artificial Neural Network that is also influenced by the biological model that represents neural networks. It is based on a prototype algorithm for supervised learning and classification. It has developed its network using an algorithm of competitive learning similar to the Self Organizing Map. It is also able to deal with the problem of multiclass classification. LVQ is composed of two layers, one of which is the input layer, and the second is called the Output. The structure of Learning Vector Quantization with the number of classes that are in the input data and the numbers of features that are input for every sample can be found below: ![]() How Learning Vector Quantization works?Let's suppose that we have input data of size (m and the number) with m being the training samples, while n refers to the number of components in each instance and an arbitrary label vector of the size (1 m). Then, it is initialized with its weights in size (n and C) from the initial number of training samples that have different labels. They must be removed in all samples of training. In this case, c is an indication of the classes. Then, iterate over the remaining input information for each example of training that it changes to the winner vector (weight vector) with the closest distance (e.g., Euclidean distance ) from the example of training ). The weight updation rules are provided by: Where alpha represents a learning rate over time t, J is an award-winning vector. In addition, i is the characteristic of the training example, and k represents the number k of the training sample using an input dataset. After training on the LVQ network, weights trained are used to classify new examples. The new instance is labelled by an LVQ class that is the one winning. AlgorithmThe steps involved include:
Below is the implementation. Code: Output: Sample T belongs to class : 0 Trained weights : [[0.3660931, 0.2816541, 1, 1], [0.33661, 0.1729, 0, 1]] Next TopicLemmatization and Tokenize with TextBlob |
A min-heap is a data structure that satisfies the heap property, which states that the value of each node is less than or equal to its children. It means that the minimum value of the heap is always stored at the root. Here is the algorithm for...
8 min read
From financial transactions to education, the modern era has embraced contactless communication. Nothing is done in person, whether you're making a payment to someone or purchasing something for your business. Overall, wouldn't you say a similar state-of-the-art contactless innovation should be applied to representative participation on...
6 min read
? Introduction: This post will teach us how to employ Python to clean the Recycle Bin. The Recycle Bin is a temporary storage location for deleted files and folders on Windows systems. A deleted document or folder is relocated to the Recycle Bin in which it can if...
4 min read
In the following tutorial, we will understand the Difflib module in the Python programming language. We will discuss the functioning of this module along with some examples based on its classes. So, let's get begun. Understanding the Python Difflib module Difflib is a built-in module in the Python programming...
7 min read
It would be very interesting to observe a solar system from space. In fact, why not make a visual depiction of the solar system using Python? The solar system will be graphically represented in this project using Python. What is a Solar System? Earth is one of...
6 min read
Almost all areas of numerical simulation use linear and polynomial equations. But the field of analysis of linear systems of equations is where they are most naturally used in engineering. Structures, elastic substances, heat fluxes, electromagnetism, electrical circuits, and many more things fall under the general...
6 min read
Python provides different functionalities that one can perform in order to manipulate PDF files, and we have already discussed a lot of things in the ious two tutorials on handling PDF files using Python. In this tutorial, we will understand how to create Interactive forms in...
16 min read
Network engineering has become progressively famous, and a wide scope of instruments for automating network setup is available to network engineers and change the game. Assuming we are as yet a beginner in the field, the accompanying tutorial will work on things for us by showing...
9 min read
? Although this computing language has some well-known problems, it is nonetheless regarded as one of the world's best and most frequently used languages. What unique qualities of Python have led to its enormous significance worldwide? You can find the solution to this question in the list...
6 min read
In this tutorial, we will learn about Boruvka's algorithm in Python. It is used to identify the minimum spanning trees. Otakar Boruvka, a Czech mathematician, introduced this algorithm and was known for his work in graph theories. This algorithm is the most famous application for finding...
15 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India