Simple implementation of a KNN and a Naive Bayes classifiers.
K-nearest neighbours is a supervised machine learning algorithm, widely known as a classification and regression tasks. It is defined as a “Lazy” learning algorithm which means that is does not have a specific training and uses all the data for training.
This task aims to predict the weight of a given person with the following details: (Charles, M, 38, 5.5).
Calculate the predicted weight of this person by hand.
Use a KNN classifier.
The second task is like the previous one but using Naïve Bayes algorithm. With Naïve Bayes we calculate not the distance as the one before but the conditional probability. The Bayes Theorem assumes independence between features. It is considered a supervised algorithm and a linear classifier.
This task aims to predict the weight of a given person with the following details: (gender: M, age: middle-age, height: medium). Use a NB classifier.