Let us build a nearest neighbours classifier that will predict which language a word belongs to. Say we represent each word using the following features. • Length of the word • Number of consonants in the word • Whether it ends with the letter ’o’ (1 if it does, 0 if it doesn’t) For example, the representation of the word ‘waffle’ would be [6, 4, 0]. For a distance function, use the Manhattan distance. d(a,b)=∑i=1n|ai−bi| where a,b∈Rn
Answers
Answered by
3
Answer:
Let us build a nearest neighbours classifier that will predict which language a word belongs to. Say we represent each word using the following features. • Length of the word • Number of consonants in the word • Whether it ends with the letter ’o’ (1 if it does, 0 if it doesn’t) For example, the representation of the word ‘waffle’ would be [6, 4, 0]. For a distance function, use the Manhattan distance. d(a,b)=∑i=1n|ai−bi| where a,b∈Rn
Similar questions