## 2 Literature Review
### Learning Vector Quantization (LVQ)  
Learning Vector Quantization (LVQ) is a supervised classification method in which each unit of output represents a predefined class (prototype) [17]. LVQ, one of the neural network algorithms, is an algorithm that adapts the results of biological studies; it indicates that different types of input sensors will be mapped to the appropriate groups on their respective areas in the cerebral cortex, which are referred to as topographic maps. LVQ also adapts the Kohonen network. LVQ has initialization, competition, cooperation, and adaptation components.  
LVQ's training process modifies a portion of the Self Organizing Map (SOM). This algorithm is used to create a separate representation of each output neuron. This means that any input that is expected to go into the same group must have common features that can be grouped to the right output neuron. The goal of LVQ is to improve the performance (recognition rate) of SOM by using target data to supervise the process while keeping the main characteristic of SOM, which is its high speed [17].  
LVQ is also based on competitive learning, where there is only one winner neuron that will be \"activated\" each time. The difference between LVQ and SOM is that LVQ checks whether the winning neuron is the same as the expected target. The suitability of a winning neuron to the targetted output determines what kind of update the weights are going to have--to make the input closer to the output if the winning neuron is the same as the expected output, or to make the input farther away from the output if the winning neuron is wrong. The determination of the winning neuron is done by finding the Euclidean distance from the input to each neuron. The neuron that has the shortest distance to the input will be treated as the winning neuron.  
Determining plagiarism using LVQ requires a training phase. Training is done to get the correct weight values for the corresponding neural network so that the program can recognize each input and group it correctly. Training is done only once, and it uses all the results from the plagiarism detection system. This is different from the normal distribution method in which the normal distribution method is executed once for each paragraph.  
In the training phase, learning vector quantization will initialize the weights by taking the input value, assuming that the weight corresponding to the input will have the distance of zero. That way, the initialized weights are already close to their ideal values. However, since weight initialization only uses a portion of the input, the weights must be trained to be able to adjust to other inputs. Weight adjustment is done by finding the nearest Euclidean distance from the input to each neuron using the formula described in Equation (1).  
\[D_{j}=\sqrt{\sum_{k=1}^{m}\left(w_{kj}-x_{ik}\right)^{2}} \tag{1}\]  
An index of the neuron that has the nearest Euclidean distance to the corresponding input is then checked to see if that neuron is the legitimate winner. If it is, the weights are modified to decrease the distance between the corresponding input, and the neuron is then represented by the index. If not, the weights are then modified to increase the distance between the corresponding input and the neuron represented by the index [18]. The weight modification follows (2) if the minimum distance \(D_{j}\) matches the class target; when it does not match, (3) is applied for weight modification.  
\[W_{ji}(new) = W_{ji}(old)-\alpha\big{(}x_{i}-W_{ji}(old)\big{)} \tag{2}\] \[W_{ji}(new) = W_{ji}(old)+\alpha\big{(}x_{i}-W_{ji}(old)\big{)} \tag{3}\]