Ok, I added two data sets from Professor Andrew Ng’s course (see references) and the results are good…I think. The first dataset is a simple and the results were as expected:
The second data set was more complex and is the one Professor Ng uses in his class. The results were not what I was expecting, but close.
First, thetaZero and thetaOne were much larger. Secondly, the prediction for 4215 was not close to the value of y that was provided in the dataset. The same for 852. But, the results were plausible.
My next step is to try other single variable data sets with known outcomes to ascertain how good the working example Mr Brownlee provided (see references) and/or how poor my understanding of the process still is.