06_NeuralNetwork_07_ImprovedRegression: Error in y_vals and x_vals indexing
ychong opened this issue · comments
yixiang commented
Hi,
I believe for 06_NeuralNetwork_07_ImprovedLinearRegression, the x_vals and y_vals are indexed incorrectly.
y_vals should be indexed as x[0] , and x_vals as x[1:8].
Here is a suggested correction:
y_vals = np.array([x[0] for x in birth_data])
x_vals = np.array([x[1:9] for x in birth_data])
For your further action. Thank you.
Sincerely,
Yi Xiang
chongyixiang@gmail.com
Nick commented
Thanks! I'll look into this in the next few months for the upcoming v2 of the book/code.
Nick commented
This should be fixed now, thanks!