Skip to content

Commit

Permalink
Merge pull request #453 from pawaspy/index
Browse files Browse the repository at this point in the history
Consumer Price Indexes Prediction
  • Loading branch information
abhisheks008 authored Dec 16, 2023
2 parents b255127 + 26e2088 commit fa9dda1
Show file tree
Hide file tree
Showing 9 changed files with 5,490 additions and 0 deletions.
274 changes: 274 additions & 0 deletions Consumer Index Prediction/Datasets/index.csv

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Consumer Index Prediction/Images/bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Consumer Index Prediction/Images/correlation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Consumer Index Prediction/Images/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5,161 changes: 5,161 additions & 0 deletions Consumer Index Prediction/Model/Consumer_Price_Prediction.ipynb

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions Consumer Index Prediction/Model/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Consumer Index Prediction

### Introduction

Predicting future consumer indices is crucial for economic forecasting and financial planning. This project explores various machine learning models for this task, including Random Forest, Decision Tree, Logistic Regression, and compares them to Deep Learning methods. Additionally, visualizations with Matplotlib and Seaborn enhance the analysis.

### Technologies

* Python 3.x
* TensorFlow (Deep Learning)
* Scikit-learn (Random Forest, Decision Tree, Logistic Regression)
* Matplotlib (Visualization)
* Seaborn (Statistical Visualization)
* Pandas (Data Manipulation)
* NumPy (Numerical Calculations)

### Data

The data is downloaded from the kaggle website (https://www.kaggle.com/datasets/satyampd/consumer-price-index-india-inflation-data).
### Model Training and Evaluation

1. **Data Preprocessing:** Clean, scale, and prepare the data for each model.
2. **Model Implementation:**
* **Random Forest:** Train a Random Forest Regressor with hyperparameter tuning.
* **Decision Tree:** Train a Decision Tree Regressor with hyperparameter tuning.
* **Logistic Regression:** Train a Logistic Regression model (if predicting binary outcome).
* **Deep Learning (optional):** Build and train a Deep Neural Network for regression or classification.
3. **Evaluation:** Compare model performance using metrics like Mean Squared Error (MSE), R-squared, or F1-score (depending on the task).
4. **Visualization:**
* Plot actual vs. predicted consumer index values for each model.
* Visualize feature importance in Random Forest and Decision Tree.
* Analyze model residuals to identify potential biases.

### Conclusion

* While Deep Learning models often achieve high accuracy, simpler models like Random Forest and Decision Trees can be effective for consumer index prediction, especially with careful feature selection and hyperparameter tuning.
* Logistic Regression can be suitable for predicting binary outcomes, such as whether the index will rise or fall.
* Visualization plays a crucial role in understanding model behavior, identifying potential issues, and communicating insights.

### Next Steps

* Explore feature engineering and dimensionality reduction techniques.
* Implement ensemble methods like stacking for improved performance.
* Apply the models to real-world data and monitor their accuracy over time.
11 changes: 11 additions & 0 deletions Consumer Index Prediction/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The python latest version needs to install (above 3.9)

The library needs to install:-
1. numpy
2. pandas
3. matplotlib.pyplot
4. seaborn
5. tensorflow

The Jupiter notebook needs to install by using anaconda or vscode for a better view.

0 comments on commit fa9dda1

Please sign in to comment.