This project predicts gold prices using a Random Forest Regressor. It also provides a simple web interface for visualization using Streamlit.
- Data Analysis: Provides an exploratory data analysis (EDA) including data description, missing value identification, and correlation matrix.
- Prediction Model: Implements a machine learning model to predict gold prices using a Random Forest Regressor.
- Web App: An interactive web interface for displaying predictions and model performance.
- Python
- Numpy: Numerical operations
- Pandas: Data manipulation and analysis
- Matplotlib: Plotting and visualization
- Seaborn: Statistical data visualization
- Scikit-learn: Machine learning algorithms (RandomForestRegressor, train_test_split, r2_score)
- Streamlit: Web app framework
- **PIL (Python Imaging Library)**Pillow: Image handling in Streamlit for loading images
-
Clone the repository:
git clone https://github.com/FahithKRM/ML_Gold-Price-Prediction.git
cd gold-price-prediction
-
Create and activate a virtual environment:
python -m venv venv
# On macOS/Linux : source venv/bin/activate
# On Windows : venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run app.py
The dataset used for this project contains gold price data. You can replace the gold_price_data.csv
file with your dataset if needed.
Dataset Link : https://www.kaggle.com/datasets/altruistdelhite04/gold-price-data
- The app allows you to visualize the dataset and check the model's performance.
- You can upload your dataset or modify the code to accommodate new features for gold price prediction.
The model used is a Random Forest Regressor, and the R2 score for model performance is calculated.
This project is licensed under the MIT License - see the LICENSE file for details.