Learning the TensorFlow way of linear regression
The statistical approach in linear regression, using matrices and decomposition methods on data, is very powerful. In any event TensorFlow has another means to solve for the coefficients of a slope and an intercept in a regression problem. TensorFlow can achieve a result in such problems iteratively, that is, gradually learning the best linear regression parameters that will minimize the loss, as we have seen in the recipes in previous chapters.
The interesting fact is that you actually don't have to write all the code from scratch when dealing with a regression problem in TensorFlow: Estimators and Keras can assist you in doing that. Estimators are to be found in tf.estimator
, a high-level API in TensorFlow.
Estimators were introduced in TensorFlow 1.3 (see https://github.com/tensorflow/tensorflow/releases/tag/v1.3.0-rc2) as ''canned Estimators'', pre-made specific procedures (such as regression...