linear-regression-sklearn
linear-regression-sklearn copied to clipboard
Wrong input as X and Y in 3 Variables
Dont you think Y = climate_change_df.as_matrix(['Year']) X = climate_change_df.as_matrix(['CO2', 'Temperature']).astype('float32') is correct instead of what you have done? We need to interchange X and Y as Y needs to be predict given X as inputs.
https://github.com/ludobouan/linear-regression-sklearn/blob/master/linear_regression.ipynb