-
-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #453 from pawaspy/index
Consumer Price Indexes Prediction
- Loading branch information
Showing
9 changed files
with
5,490 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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.
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.
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
5,161
Consumer Index Prediction/Model/Consumer_Price_Prediction.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|