I have a dataset of 25 instances these instances are divided into 2 classes Green Circles and Blue Squares
data distributed as this graph
I want to predict X's class based on "Likelihood Weighted KNN with k =3"
In normal KNN this is easy
the nearest 3 points are 2 Blue Squares and 1 Green Circle
which means X will be Blue Square
there are more Blue Squares neighbours than Green Circles (2 vs 1)
But What is needed is to find the Likelihood Weighted KNN with k =3
This is my try
In this case we have to calculate the weight (Likelihood) for each instance
Each Green Circle likelihood is $\frac{1}{5} $ , we have 5 Green Circles
While for Blue Squares it is $\frac{1}{20} $ , we have 20 Blue Squares
Therefore the weights around X will be $\frac{1}{5} $ Green Circle, and $\frac{2}{20} $ Blue Squares.
which means $\frac{1}{5} > \frac{2}{20} $
Then X is Green Circle
Well, this is wrong :(
Can someone help me find the