Skip to content

Commit 2690fc2

Browse files
committed
temp fix icews dataset loading
1 parent c67903d commit 2690fc2

File tree

2 files changed

+107
-3
lines changed

2 files changed

+107
-3
lines changed

multidynet/datasets/load_icews.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ def load_icews(dataset='small', country_names='full', year_range=None):
1717
Y = joblib.load(open(file_name, 'rb'))
1818

1919
if country_names == 'full':
20-
countries = np.loadtxt(
21-
join(file_path, dir_name, 'numpy_data', 'icews_countries.txt'),
22-
delimiter='\n', dtype=np.unicode)
20+
#countries = np.loadtxt(
21+
# join(file_path, dir_name, 'numpy_data', 'icews_countries.txt'),
22+
# delimiter='\n', dtype=np.unicode)
23+
countries = pd.read_csv(
24+
join(file_path, dir_name, 'numpy_data', 'icews_countries.csv')).values.ravel()
25+
2326
else:
2427
countries = np.loadtxt(
2528
join(file_path, dir_name, 'numpy_data', 'icews_countries_iso.txt'),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
0
2+
United States
3+
United Kingdom
4+
France
5+
Australia
6+
China
7+
India
8+
Japan
9+
South Korea
10+
Russia
11+
Canada
12+
South Africa
13+
Brazil
14+
Germany
15+
Iran
16+
Nigeria
17+
Spain
18+
Egypt
19+
Philippines
20+
Turkey
21+
Cuba
22+
Israel
23+
Italy
24+
New Zealand
25+
Georgia
26+
Vietnam
27+
Libya
28+
Netherlands
29+
Belgium
30+
Switzerland
31+
United Arab Emirates
32+
Argentina
33+
Uganda
34+
Occupied Palestinian Territory
35+
Thailand
36+
Kenya
37+
Qatar
38+
North Korea
39+
Pakistan
40+
Indonesia
41+
Morocco
42+
Latvia
43+
Afghanistan
44+
Austria
45+
Mexico
46+
Singapore
47+
Taiwan
48+
Venezuela
49+
Colombia
50+
Iraq
51+
Portugal
52+
Algeria
53+
Norway
54+
Saudi Arabia
55+
Ethiopia
56+
Ireland
57+
Lithuania
58+
Syria
59+
Azerbaijan
60+
Sudan
61+
Sweden
62+
Ukraine
63+
Romania
64+
Kuwait
65+
Bulgaria
66+
Holy See
67+
Lebanon
68+
Tunisia
69+
Greece
70+
Chile
71+
Angola
72+
Czech Republic
73+
Malaysia
74+
Poland
75+
Somalia
76+
Tanzania
77+
Bangladesh
78+
Denmark
79+
Jordan
80+
Andorra
81+
Croatia
82+
Ghana
83+
Sri Lanka
84+
Liberia
85+
Kazakhstan
86+
Peru
87+
Finland
88+
Senegal
89+
Haiti
90+
Estonia
91+
Serbia
92+
Slovakia
93+
Mali
94+
Yemen
95+
Zambia
96+
Zimbabwe
97+
Rwanda
98+
Cote d'Ivoire
99+
Democratic Republic of Congo
100+
Belarus
101+
Hungary

0 commit comments

Comments
 (0)