Data310_workbook

View the Project on GitHub SGLott/Data310_workbook

Response 1

1) In Laurence Maroney’s video, What is ML, he compares traditional programming with machine learning and argues that the main difference between the two is a reorientation of the rules, data and answers. According to Maroney, what is the difference between traditional programming and machine learning?

Traditional programming starts with an input of data and rules and gets an output of answers. With machine learning, you instead input answers and data, and return rules.

2) With the first basic script that Maroney used to predict a value output from the model he estimated (he initially started with 10 that predicted ~31. Modify the predict function to produce the output for the value 7. Do this twice and provide both answers. Are they the same? Are they different? Why is this so?

Run 1: 21.99, Run 2: 21.99, I received the same answer twice, but when I ran the model with the value of 10, my model did not always predict the same value (even though the prediction was always near 31). You would expect the answer to be different because the model is rerunning based on how close the guess for the relationship between x and y was. The model might not always predict the same output on the first guess.

3) Using the script you produced to predict housing price, take the provided six houses from Mathews, Virginia and train a neural net model that estimates the relationship between them. Based on this model, which of the six homes present a good deal? Which one is the worst deal? Justify your answer.

I adjusted the model to have the bedrooms in the xs array and the corresponding Mathews house prices in the ys array. Then I ran the model and had it predict the values for houses with each of the bedroom numbers given. According to the adjusted model, a 2 bedroom house should cost $166,000, a 3 bedroom house should cost $233,000, a 4 bedroom house should cost $300,000, and a 5 bedroom house should cost $366,000. The house that seems to be the best deal would be the house that is only $97,000 with 3 bedrooms. The house with the worst deal would be the the two bedroom house that is estimated to cost $166,000, but is $250,000 ($84,000 over the model prediction). Because the model only has one neuron though, the model can’t consider other factors like number of bathrooms, acreage, etc.