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.
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.
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.