https://github.com/diepala/gdp_growth_forecast
CLI to forecast the GPD growth of different countries
https://github.com/diepala/gdp_growth_forecast
Last synced: 4 months ago
JSON representation
CLI to forecast the GPD growth of different countries
- Host: GitHub
- URL: https://github.com/diepala/gdp_growth_forecast
- Owner: diepala
- License: mit
- Created: 2021-08-25T13:30:46.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-25T13:47:12.000Z (almost 4 years ago)
- Last Synced: 2025-01-13T03:31:31.070Z (5 months ago)
- Language: Jupyter Notebook
- Size: 8.54 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## GDP Growth Forecast
GPD Growth Forecast is a software that provides a command line interface tool
to train a model and make predictions about GDP Growth for the different countries in the world.The way the software works is
- It processes the database data by removing columns with too many NaN and replacing the remaining with the mean of other samples, accoeding to different criterias (mean by year, mean by income group, ...).
- The data is also organized in a convenient way for manipulation, with one column for each indicator.
- To reduce the number of features of the model, it is computed the shap values to select the most important features.
- Then, a gradient boosting regressor based model is trained with the selected features.
- Finally, the software allows to make predictions of GDP growth with the trained model.Notes:
- Selected features and the model are stored in persistent files so that they can be used again.
#### Authors (NIU)
- Arturo del Cerro (1593930)
- Nil Bellmunt (1588664)
- Diego Palacios (1594283)### Documentation
Take a look at the [documentation](documentation.html)!
## Usage
For the tool to work properly, it is needed the sqlite3 database with the dataset. Download the database [here](https://www.kaggle.com/worldbank/world-development-indicators/version/2?select=database.sqlite) and place it in the base directory of the project renamed to `db.sqlite3`.
The `cli` script is the one to be executed by the user.
It is used to select the model features, train the model and make the predictions.To select the features execute:
```bash
./cli.py select_features
```
You can also specify the number of features to select (default is 50). For example, to select 40 features execute:```bash
./cli.py select_features -N 40
```To train the model just run:
```bash
./cli.py train
```To predict the GDP Growth for the 2011 year run:
```bash
./cli.py predict
```The results are saved into the database. To predict a specified year (e.g. 1992) run
```bash
./cli.py predict --year 1992
```The prediction year must be between 1961 and 2011.