Stock price prediction


what is wrong in code since when i am predicting the values all comes out to be same.

Hello @commonid369,

If you are getting same outputs for every input, then the reason might be a very highly overfitted model. Try decreasing the layers or decrease the number of units per layer, if you are using stacked LSTM then, reduce the number of depth. And retrain your model, also, make sure you are providing the input sequences properly.
If the problem persists, let us know here!
Happy Learning :slight_smile:
Thanks

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

i don’t why but when i used minmaxscaler on y values and after prediction i used ‘inverse_transform’ on it, the accuracy suddenly increased to 60%, what is the reason behind it, since usually we use minmaxscaler on x values?

Hello @commonid369,

I have not personally witnessed anyone, anywhere scaling the target values in a regression task. But, I have sure seen researchers predicting the logarithm of the target value and taking exponent after prediction. Such a technique is used when the intervals between target values are very high.
Here, MinMaxScaling might have reduced the said intervals, also getting the values into a specific range which might have helped your model to generalise better and/or converge better.
Thanks :slight_smile: