From the course: Machine Learning and AI Foundations: Value Estimations

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Find the best weights automatically

Find the best weights automatically

From the course: Machine Learning and AI Foundations: Value Estimations

Start my 1-month free trial

Find the best weights automatically

- [Instructor] In the last video, we wrote a program that estimated the value of a house by multiplying each of its attributes by a fixed weight, and adding them up to get a total value. The function we wrote did the exact same math as this equation. The house's value = 50,000 + square feet times the first weight and bedrooms times the second weight. But how do we know what value to use for each of these weights so that the predictions generated by the function are accurate? The trick is to turn finding the weights into an optimization problem that the computer can solve on its own. When we are training our machine learning algorithm, we're really asking it to find the best weights that most closely reproduce the answers in the training data set. First, we need some training data. Here's our data for three houses that we can use to train our algorithm. For each house, we have the number of bedrooms, the size in square feet, and the home's actual value. Let's write out our home value…

Contents