Using a loss function for simple regression

Linear regression is one of the simplest models we can implement; you've probably used it before in your own job. Simple regression attempts to find the line of best fit for two linearly distributed variables. We can use all of the principles that we've precedingly learned about weights, biases, and loss functions, and apply them to a simple regression to see how they work together. 

Now, let's get back to loss functions. MSE measures the average squared difference between an observation’s actual and predicted values. The output is a single number representing the cost or score associated with our current set of weights:

Let's develop a linear regression in TensorFlow to see how loss functions, ...

Get Hands-On Artificial Intelligence for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.