Linear Regression Code Errors/Doesn’t Work
When executing this exact code on my dataset I get multiple errors and my cost function is incredibly high for the first 200 epochs, and after goes to NaN. I’ve tried to fix it but I just can’t seem to find the solution. I think it has probably got to do with my code adding up the numbers (like in the error) to an infinitely large number, causing it to output a NaN cost because the numbers cant be stored that high.
Python Linear Regression Code Errors/Doesn’t Work
When executing this exact code on my dataset I get multiple errors and my cost function is incredibly high for the first 200 epochs, and after goes to NaN. I’ve tried to fix it but I just can’t seem to find the solution. I think it has probably got to do with my code adding up the numbers (like in the error) to an infinitely large number, causing it to output a NaN cost because the numbers cant be stored that high.