assingment
For each question below, you must provide a detailed explanation of particular types of machine learning algorithms. You may include code or math to help make your response clearer. Answers which include only code or math without explanation of what those equations or functions are actually doing will be considered incorrect.
For example, the following is NOT an acceptable response to a question about how a kNN model makes predictions unless it is also accompanied by descriptive text about exactly how the predict function works:
import sklearn.neighbors.KNeighborsClassifier as knn
m = knn()
y_hat = m.predict(X)
If any of your responses are a copy and paste from a website or the API documentation, you will receive a 0 for this entire exam.
Question 1
Describe, in your own words, how a decision tree can be (1) built and (2) used for prediction.
Question 2
Describe, in your own words, how a nearest neighbors algorithm can be (1) built, and (2) used for prediction.
Question 3
Describe, in your own words, how the Naive Bayes algorithm can be (1) built and (2) used for prediction.
Question 4
Describe, in your own words, how an Ordinary Least Squares Regression model can be (1) built and (2) used for prediction.