Implementing Deming regression
In this recipe, we will implement Deming regression (total regression), which means we will need a different way to measure the distance between the model line and data points.
Getting ready
If least squares linear regression minimizes the vertical distance to the line, Deming regression minimizes the total distance to the line. This type of regression minimizes the error in the y values and the x values. See the following figure for a comparison:
Get TensorFlow Machine Learning Cookbook 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.