ns .Assignments should be handed over to the instructor on the due date. Zero mark will...
ns .Assignments should be handed over to the instructor on the due date. Zero mark will follow late submission of an assignment unless the student has an acceptable reason approved by the In addition to the hardcopy, a softcopy must be submitted through the Moodle website before the deadline . uestion 1: K- K-Nearest Neighbor (KNN) is a supervised learning algorithm where the result of new example is classified based on majority vote on the K-nearest neighbor classes. Let us consider the following game: We want to check the ability of a child below 6 to identify if a fruit is sour or sweet. First we asked each child to close his/her eyes and then by tasting a fruit, identify if it is sour or sweet. We also asked each child to provide a score of sweetness and sourness for each fruit in 10 scales The table below saves their answers: Nearest Neighbor (KNN) (5 marks Fruit Sweetness Sourness Fruit Type Cherry Banana Grapes Sweet Sweet Sweet Sweet Sweet Sweet Figs Mango 10 Orange Table 1: Training data As you can see Lemon for example, has the high number in Sourness and low number in sweetness. While Mango has high number (10) for sweetness and zero number for sourness. Now, let us consider a NEW fruit which is not among the given list: Strawberry for example. We also assume that we have some scores of sourness and sweetness as below Fruit Sweetness Sourness Fruit Type Strawberry 4 Table 2: Testing data