-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.py
38 lines (30 loc) · 1.19 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
'''
Peter Poliakov, Hiromu Sugiyama, Raymond Smith
CSE 163
This program creates 8 PredictRates objects, each for Canada, Australia,
Japan, United States, United Kingdom, South Africa, South Korea, or the
Euro Zone, respectively. PredictRates allows us to create predictions on
how certain economic indicators (GDP, unemployment rate, CPI, stock) affect
interest rates.
'''
from predict_rates import PredictRates as pr
def create_pr(countries: list[str]) -> None:
'''
Takes a list of countries and creates PredictRates for each,
including a heatmap and regression model.
'''
pred = {}
for country in countries:
dir = "./Data/" + country.capitalize().replace('_', ' ') + "/"
pred[country] = pr(dir, country)
# Plotting heatmap and understand the relation between the variables
pr.plot_heatmap(pred[country])
# Preprocess of Data
pr.preprocess_standard(pred[country])
pr.ridge_regression(pred[country], ALPHA=10.0)
def main():
countries = ['canada', 'australia', 'japan', 'united_states',
'united_kingdom', 'south_africa', 'south_korea', 'euro_zone']
create_pr(countries)
if __name__ == "__main__":
main()