Skip to Main Content
Hands-On Artificial Intelligence for Beginners
book

Hands-On Artificial Intelligence for Beginners

by David Dindi, Patrick D. Smith
October 2018
Beginner content levelBeginner
362 pages
9h 32m
English
Packt Publishing
Content preview from Hands-On Artificial Intelligence for Beginners

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Artificial Intelligence and Machine Learning Fundamentals

Artificial Intelligence and Machine Learning Fundamentals

Zsolt Nagy

Publisher Resources

ISBN: 9781788991063Supplemental Content