Skip to content

Here I have created a Gated Recurrent Units based deep learning model which is capable of predicting and forecasting bitcoin prices with a Root Mean Squared Error of 1.7 and R2 Score of 0.98.

License

Notifications You must be signed in to change notification settings

NavinBondade/Forecasting-The-Bitcoin-Price-With-An-R2-Score-Of-0.98-MSE-Of-1.17

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 

Repository files navigation

Bitcoin Price Prediction & Forecasting With
R2 Score Of 0.98 & Root Mean Squared Error Of 1.17

Bitcoin is one of the world's most popular and valued cryptocurrencies since its invention in 2008 bitcoin has shown a massive jump in its price and established itself as a potential investment for investors. But the major thing that goes against investing in Bitcoin is its volatile nature, and it's not the authority of someone. Also, bitcoin is quite volatile, which makes it more difficult to predict its price. To eliminate this cumbersome task, I have created a deep learning system that is capable of predicting and forecasting bitcoin prices with a root mean square error of just 1.77.

Libraries Used

  • Tensorflow
  • Keras
  • Numpy
  • Pandas
  • Matplotlib
  • Numpy
  • Sklearn

Data Visualization

Bitcoin Price (High) Complete Time Series

Bitcoin Price (High) Train Time Series

Bitcoin Price (High) Test Time Series

Model Detail

The deep learning model at its core uses Gated Recurrent Units (GRU) which is a type of Recurrent Neural Network (RNN) for learning long-term dependencies and avoiding vanishing gradient problems. GRU also has a fewer number of gates than Long Short Term Memory (LSTM), which facilitates less memory usage and much faster traning. The model uses three GRU layers for learning long-term dependencies and three dense neural network layers for decision making. All the layers use RELU as an activation function except the last one.During training, the model uses Adam as an optimizer and uses mean squared error as the loss function.

Model Training

The model was trained for 20 epochs with batch size of 1000. After training process the model has shown loss of 9.9850e-04.

Model Evaluation

  • Mean Squared Error: 3.13
  • Root Mean Squared Error: 1.77
  • R2 Score: 0.98

Model Prediction

Even without having trend, season, and patterns in time-series, the GRU based deep learning model has forecasted the next 50 days price of Bitcoin very accurately.

Conclusion

In this project, I have created a Gated Recurrent Units based deep learning model which is capable of predicting and forecasting bitcoin prices with a Root Mean Squared Error of 1.7 and R2 Score of 0.98.

About

Here I have created a Gated Recurrent Units based deep learning model which is capable of predicting and forecasting bitcoin prices with a Root Mean Squared Error of 1.7 and R2 Score of 0.98.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published