Linear regression with TensorFlow
Linear regression is a supervised machine learning technique that models the linear relationship between the predicted output variable (dependent variable) and one or more independent variables. When one independent variable can be used to effectively predict the output variable, we have a case of simple linear regression, which can be represented by the equation y = wX + b, where y is the target variable, X is the input variable, w is the weight of the feature(s), and b is the bias.
Figure 3.1 – A plot showing simple linear regression
In Figure 3.1, the straight line, referred to as the regression line (the line of best fit), is the line that optimally models the relationship between X and y. Hence, we can use it to determine the dependent variable based on the current value of the independent variable at a certain point on the plot. The objective of linear regression is to find the best values of w and b, which...