(Python) Stock_Market prediction using Linear regression : I'm trying to improve a stock_market prediction model using LinearRegression() on sklearn, first of all I'm new to machine learning and I am kind of struggling on how the code works here it is : [The Code][1]

Then it seems that we are using the same data two times one is scaled and called X and the other not called y. So I don't get how it can predict anything if it's just a line between two same data ???

Thanks for your help !!!!

  [1]: https://www.kaggle.com/dkmostafa/predicting-stock-market-using-linear-regression