Question: R Programming Learning vector quantisation (LVQ) is a simple machine learning technique for classification. We will only look at binary classification (i.e. we only want
R Programming


Learning vector quantisation (LVQ) is a simple machine learning technique for classification. We will only look at binary classification (i.e. we only want to classify objects in two classes). R Programming For the ith object we have covariates xi describing the object and a response label yi {0,1}. The basic idea of the method is that we would like to learn prototypes of the two classes. We start by randomly choosing K observations from each class as prototypes. We then repeatedly go through all data points and find for each data point the nearest prototype. If the prototype is of the same class as the observation, we move the prototype closer to that observation. If the prototype is of a different class we move it further away. You can use the following R code to draw the initial 2K prototypes stored in a matrix with 2K rows. is
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
