Data-310-Public-Raposo

Data 310 project summaries

View the Project on GitHub aeraposo/Data-310-Public-Raposo

Class 2 Exercise (7.7.20)

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?

The main difference can be decribed as follows: Rules and data (in)→ (traditional programming) → answers (out) Answers and data (in) → (machine learning) → rules (out)

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: 22.00332
run #2: 21.998444
They are different. The model is trained slightly differently each time because it is forced to extrapalate a potential relation in data we don’t yet have. The difference in training occurs because the machine has no idea what the relation in the data is so it has to make a guess. This guess is slightly different each time we train because it has a random compenent. The loss function then determines how good or bad this guess is and the optimizer makes another guess. The accuracy of this guess is measured by the loss function. This process of guessing and checking continues a specified number of times, which trains the neural network, reducing the loss function.

3. Using the script you produced to predict housing price, take the provided six houses 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.

After training the model on the provided data, I asked the model to predict the price of homes with 2-5 bedrooms. Next, I compared the predicted values with the actual values of the home to determine if, according to the model, the houses were being sold for a good or bad price comparatively. According yo my analysis,
The 2 bedroom house listed at $250k was a bad deal (the model predicted ~$158k)
The 3 bedroom houses listed at $97k and $229k were a good deals (the model predicted ~260k)
The 4 bedroom house listed at $289k was a good deal (the model predicted ~$362k)
The 5 bedroom house listed at $577k was a bad deal (the model predicted ~$465k)
Of these listing, according to my model, the worst deal was the 5 bedroom house, listed at a whopping ~$112k over price (the 2 bedroom house was a close second at ~$92k over price).