Hello, while I was experimenting with Multiple Variable Linear Regression myself, the cost does not decrease below 340,000. These are the training data and results(i used real data here):
traning data:
X_train = np.array(
[[410, 3.15, 8.3, 2.7], [6269, 6.25, 10.8, 3.7], [304, 2.49, 9.1, 2.7], [163, 2.14, 7.1, 2.5], [77, 2.0, 6.6, 2.4], [90, 2.42, 7.2, 3.1], [2927, 6.34, 11.2, 4.1], [614, 2.25, 10.2, 3.4], [242, 2.28, 10.8, 3.4], [28, 1.58, 7.3, 1.7], [98, 2.53, 10.5, 3.2], [4326, 7.06, 11.2, 4.0], [33, 2.01, 6.0, 1.5], [61, 2.04, 9.0, 2.7], [74, 2.57, 8.5, 2.5], [9, 1.24, 3.4, 0.8], [1288, 6.12, 11.5, 3.1],
[1904, 3.07, 13.3, 3.6], [46, 2.19, 9.1, 1.5], [78, 3.29, 8.2, 1.4], [596, 4.07, 8.7, 3.2], [271, 6.38, 7.4, 2.3], [142, 14.49, 12.6, 3.8], [18, 4.15, 6.4, 0.9], [2, 0.53, 4.0, 0], [4, 5.23, 3.7, 0.2]])
y_train = np.array(
[563, 15533, 522, 193, 100, 118, 7494, 663, 313, 40, 121, 13878, 42, 80, 109, 9, 3039, 2049, 40, 108, 907, 522, 809,
32, 3, 11])
result:
Iteration 120000: Cost 347705.10
b,w found by gradient descent: 0.00,[2.58450625e+00 3.92584067e-03 2.20701270e-03 1.12301534e-03]
What is the reason? How can I decrease the Cost even more?
i can send the whole code, if it would be helpful.