https://github.com/shervinnd/bitcoin-price-prediction-ml-dl
Predict Bitcoin prices with ML & DL models! π Uses Ridge, Lasso, Random Forest, MLP, RNN & LSTM with hyperparameter tuning. π Visualizes predictions & ROC curves. π Fetch data via yfinance, evaluate with MSE/R2. Perfect for crypto enthusiasts! πΈ
https://github.com/shervinnd/bitcoin-price-prediction-ml-dl
cryptocurrency data-science data-visualization decision-tree deep-learning financial-modeling machine-learning neural-networks predictive-analytics price-prediction python random-forest regression rnn scikit-learn simple-rnn tensorflow time-series yfinance
Last synced: about 1 month ago
JSON representation
Predict Bitcoin prices with ML & DL models! π Uses Ridge, Lasso, Random Forest, MLP, RNN & LSTM with hyperparameter tuning. π Visualizes predictions & ROC curves. π Fetch data via yfinance, evaluate with MSE/R2. Perfect for crypto enthusiasts! πΈ
- Host: GitHub
- URL: https://github.com/shervinnd/bitcoin-price-prediction-ml-dl
- Owner: shervinnd
- License: mit
- Created: 2025-08-23T12:22:17.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-08-23T12:33:51.000Z (about 2 months ago)
- Last Synced: 2025-08-23T18:40:58.394Z (about 2 months ago)
- Topics: cryptocurrency, data-science, data-visualization, decision-tree, deep-learning, financial-modeling, machine-learning, neural-networks, predictive-analytics, price-prediction, python, random-forest, regression, rnn, scikit-learn, simple-rnn, tensorflow, time-series, yfinance
- Language: Jupyter Notebook
- Homepage:
- Size: 271 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bitcoin Price Prediction ππΈ
Welcome to the **Bitcoin Price Prediction** repository! This project
implements and compares various machine learning and deep learning
models to predict Bitcoin prices using historical data from Yahoo
Finance. π## π Overview
This repository contains Python code for predicting Bitcoin (BTC-USD)
prices using a variety of models, including Ridge, Lasso, ElasticNet,
K-Nearest Neighbors, Decision Trees, Random Forest, Gradient Boosting,
MLP Regressor, and Recurrent Neural Networks (RNN) with SimpleRNN and
LSTM architectures. The code includes data preprocessing, hyperparameter
tuning, model evaluation, and visualizations of actual vs.Β predicted
prices, along with an ROC curve for price direction prediction. π## π οΈ Features
- **Data Source**: Fetches historical Bitcoin price data using
`yfinance`. π‘
- **Preprocessing**: Normalizes features and creates sequences for
time-series modeling. π
- **Models**: Implements multiple regression models with optimized
hyperparameters. π§
- **Evaluation**: Compares model performance using MSE and R2 scores.
π
- **Visualizations**: Plots actual vs.Β predicted prices and RNN
training loss. π¨
- **ROC Curve**: Evaluates price direction prediction (up/down) with
an ROC curve. π## π Requirements
To run the code, install the required Python packages:
``` bash
pip install yfinance numpy pandas matplotlib scikit-learn tensorflow
```## π Getting Started
1. **Clone the Repository**:
``` bash
git clone https://github.com/shervinnd/bitcoin-price-prediction.git
cd bitcoin-price-prediction
```2. **Install Dependencies**: Ensure all required libraries are
installed (see Requirements).3. **Run the Code**: Execute the main script:
``` bash
python deep4.py
```4. **Explore Results**:
- View model performance metrics (MSE, R2).
- Check visualizations for actual vs.Β predicted prices and RNN
training loss.
- Analyze the ROC curve for price direction prediction.## π Results
The models are evaluated on the last 20% of the dataset, reflecting
their predictive power on recent data. The repository includes: - A
summary table of model performance (MSE and R2 scores). - Plots
comparing actual and predicted Bitcoin prices for all models. - RNN
training loss and ROC curve for price movement classification.## ποΈ Repository Structure
- `deep4.py`: Main script with data preprocessing, model training, and
evaluation.
- `README.md`: This file, providing an overview and instructions.## π€ Contributing
Contributions are welcome! Feel free to: - Open issues for bugs or
feature requests. π - Submit pull requests with improvements or new
models. π‘## π License
This project is licensed under the MIT License. See the
[LICENSE](LICENSE) file for details.## π¬ Contact
For questions or suggestions, open an issue or reach out via GitHub.
Let's predict the future of Bitcoin together! ππ°------------------------------------------------------------------------
*Built by Miracleβ‘*