Economic Tensor PCA Modeling (ETPCA) is an analysis tool designed for economic data analysis. It employs a combination of tensor product, Principal Component Analysis (PCA), and linear regression to predict Gross National Product (GNP) values, providing a nuanced understanding of economic trends.
Note: the current implementation uses CPI and DJIA, but any known metrics of the time can be substituted in at the users will, though the outcome will change and cannot promised to be as correct. Data that represents the "economy" at large will often return best results.
- Monthly data for DJIA (Dow Jones Industrial Average) and CPI (Consumer Price Index).
- Yearly GNP values.
- Conversion of dates to a numerical format for regression analysis.
- Normalization of data to ensure uniformity in scale.
- Initial linear interpolation between the beginning and ending GNP values.
- Calculation of the slope for monthly GNP estimation.
- Creation of a multidimensional array (tensor) from DJIA and CPI vectors.
- Captures interaction effects between these two economic indicators.
- Orthogonal transformation of the tensor product.
- Extraction of primary components, reducing dimensionality while retaining key data variations.
- Mapping PCA data back to a readable GNP scale.
- Training a regression model with PCA components to predict monthly GNP values.
- Tensor Product: Represents the interaction effect between CPI and DJIA, reflecting the "economy" in relation to GNP.
- PCA: Extracts underlying trends and patterns from the tensor data.
- Regression Model: Translates these trends into predicted monthly GNP values.
- Clone the repository:
git clone https://github.com/gituser12981u2/Economic-Tensor-PCA-Modeling--ETPCA-.git
- Navigate to the 'src' directory:
cd Economic-Tensor-PCA-Modeling--ETPCA-/src
- Run the main script:
python main.py
Contributions to the ETPCA project are welcome. Feel free to fork the repository, make your changes, and submit a pull request.
This project is available under the GPL license