Python Gradient-descent Multi-regression - Cost Increases To Infinity
Writing this algorithm for my final year project. Used gradient descent to find the minimum, but instead getting the cost as high as infinity. I have checked the gradientDescent f
Solution 1:
As forayer mentioned in the comments, the problem is in the line where you read the csv. You are setting delimiter=","
, which means that python expects each column in your data to be separated by a comma. However, in your data, columns are apparently separated by a whitespace.
Just substitute the line with
df = pd.read_csv(r'C:\Users\WELCOME\Desktop\FinalYearPaper\ConferencePaper\NewTrain.csv', 'rU', delimiter=" ",header=None)
Post a Comment for "Python Gradient-descent Multi-regression - Cost Increases To Infinity"