py-ssa-lib 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
py_ssa_lib/MSSA.py ADDED
@@ -0,0 +1,438 @@
1
+ import pandas as pd
2
+ import numpy as np
3
+ import matplotlib.pyplot as plt
4
+ import scipy as sp
5
+ from matplotlib.ticker import MaxNLocator
6
+ from sklearn.utils.extmath import randomized_svd
7
+
8
+ class MSSA():
9
+ """
10
+ Creates an instance of the MSSA object
11
+
12
+ Parameters
13
+ ----------
14
+ Verbose: bool, outputs parameters used for an instance
15
+
16
+ Returns
17
+ -------
18
+ object of class MSSA
19
+ """
20
+
21
+ def __init__(self, Verbose=False):
22
+ self.Verbose = Verbose
23
+ if self.Verbose==True:
24
+ print("MSSA is initialized")
25
+
26
+ def construct_trajectory_matrix(self):
27
+ """
28
+ Constructs a trajectory matrix from a lagged versions of the time series
29
+
30
+ Parameters
31
+ ----------
32
+ Takes arguments from the instance
33
+
34
+ Returns
35
+ -------
36
+ X:numpy.array, representing the trajectory matrix
37
+ """
38
+
39
+ X = np.column_stack([np.column_stack([self.X_s[i:i+self.L,s] for i in range(0,self.K)]) for s in range(self.S)])
40
+ return X
41
+
42
+ def decompose_trajectory_matrix(self,**kwargs):
43
+ """
44
+ Decomposes a trajectory matrix using full svd or randomized svd
45
+
46
+ Parameters
47
+ ----------
48
+ Takes arguments from the instance
49
+ **kwargs for the svd routine
50
+
51
+ Returns
52
+ -------
53
+ U,Sigma, V.T: all are numpy.arrays, representing the left-hand side and right-hand side eigenvectors and
54
+ corresponding eigenvalues
55
+ """
56
+ if self.decomposition == "svd":
57
+ if self.Verbose==True:
58
+ print("Using full SVD")
59
+ self.d = np.linalg.matrix_rank(self.X_ss)
60
+ U, Sigma, V = np.linalg.svd(self.X_ss,**kwargs)
61
+ elif self.decomposition == "rand_svd" :
62
+ if self.Verbose==True:
63
+ print("Using randomized SVD ")
64
+ self.d = self.L // 2 - 1
65
+
66
+ U, Sigma, V = randomized_svd(self.X_ss,n_components= self.d,#self.L - self.L//3 ,
67
+ n_oversamples=100, random_state=0,power_iteration_normalizer='LU',n_iter=15)
68
+ #self.d = np.max(np.where(Sigma>0))
69
+
70
+ else:
71
+ self.d = 1
72
+ raise ValueError("Wrong decomposition type")
73
+ return U, Sigma, V.T
74
+
75
+ def elementary_matrix(self):
76
+ """
77
+ Constructs a matrix(tensor) of all elementary components
78
+
79
+ Parameters
80
+ ----------
81
+ Takes arguments from the instance
82
+
83
+ Returns
84
+ -------
85
+ X_elem:numpy.array, representing the matrix(tensor) of all elementary components
86
+ """
87
+ X_elem = np.array( [self.Sigma[i] * np.outer(self.U[:,i], self.V[:,i]) for i in range(0,self.d)] )
88
+ return X_elem
89
+
90
+
91
+
92
+
93
+ def X_to_TS(self, X_i):
94
+ """
95
+ Averages the anti-diagonals of the given elementary matrix, X_i,
96
+ and returns a reconstructed time series for the given component X_i.
97
+
98
+ Parameters
99
+ ----------
100
+ X_i: numpy.array, elementary matrix for the given component
101
+
102
+ Returns
103
+ -------
104
+ rec_ts: numpy.array, reconstructed time series for the given component X_i
105
+ """
106
+
107
+ # Reverse the column ordering of X_i
108
+ X_rev = X_i[::-1]
109
+ rec_ts = np.array([X_rev.diagonal(i).mean() for i in range(-X_i.shape[0]+1, X_i.shape[1])])
110
+ return rec_ts
111
+
112
+ def fit(self, df, L, decomposition,idx_start_ts, **kwargs ):
113
+ """
114
+ Fits the instance of MSSA to the data
115
+ Parameters
116
+ ----------
117
+ df:pandas.DataFrame, data frame of the time series, it is a source of the data, used to infer the length of each time series N
118
+ and number of time series S in the data set,
119
+ Dataframe should have the following structure:
120
+ the rows must contain values for each sample, while the column contain the data for a particular time period.
121
+ (WIDE FORMAT)
122
+
123
+ L:int, Window Size, the most important parameter for the (M)SSA.
124
+
125
+ decomposition:str, type of decomposition of the trajectory matrix.
126
+ Available options are "svd" meaning full svd-decomposition, and "rand_svd" meaning its
127
+ "truncated version".
128
+
129
+ idx_start_ts:int, the first column index of the data frame where the first nummeric value occours,
130
+ i.e where the time series start(s). Used to cutoff irrelevant columns from the input data set.
131
+
132
+
133
+ Returns
134
+ -------
135
+ No output
136
+ """
137
+
138
+ self.decomposition = decomposition
139
+ self.df = df
140
+ self.idx_start_ts = idx_start_ts
141
+ self.ts_df = self.df.iloc[:,self.idx_start_ts:].T
142
+
143
+
144
+ self.S = self.ts_df.shape[1]
145
+ self.X_s = self.ts_df.to_numpy()
146
+ self.N = int(self.X_s.shape[0])
147
+ self.L = int(self.X_s.shape[0]/1.5) if (L == None) else L
148
+ self.K = int( self.N - self.L + 1 )
149
+
150
+ if self.Verbose==True:
151
+ print(f' N = {self.N}, K = {self.K}, L = {self.L}, S = {self.S} ')
152
+
153
+ self.X_ss = self.construct_trajectory_matrix(**kwargs)
154
+ self.U, self.Sigma, self.V = self.decompose_trajectory_matrix(**kwargs)
155
+ self.X_elem = self.elementary_matrix(**kwargs)
156
+ self.sigma_sumsq = (self.Sigma**2).sum()
157
+ self.rel_contribution = self.Sigma**2 / self.sigma_sumsq * 100
158
+ self.cumsum_contr = (self.Sigma**2).cumsum() / self.sigma_sumsq * 100
159
+
160
+
161
+ def plot_eigenvals_contribution(self,**kwargs):
162
+ """
163
+ Plots the contribution of eigenvalues
164
+ Parameters
165
+ ----------
166
+ **kwargs some additional parameters for visualization functions of pyplot
167
+ Returns
168
+ -------
169
+ No output
170
+ """
171
+
172
+
173
+ fig, ax = plt.subplots(1, 2, figsize=(14,5),**kwargs)
174
+ ax[0].plot(self.rel_contribution , lw=2.5,**kwargs)
175
+ ax[0].set_xlim(0,self.d)
176
+ ax[0].grid()
177
+ ax[0].set_title(r"Relative Contribution of $\mathbf{X}_i$ to Trajectory Matrix")
178
+ ax[0].set_xlabel(r"$i$")
179
+ ax[0].set_ylabel("Contribution (%)")
180
+ ax[1].plot(self.cumsum_contr, lw=2.5,**kwargs)
181
+ ax[1].set_xlim(0,self.d)
182
+ ax[1].set_title(r"Cumulative Contribution of $\mathbf{X}_i$ to Trajectory Matrix")
183
+ ax[1].set_xlabel(r"$i$")
184
+ ax[1].grid()
185
+ ax[1].set_ylabel(r"Contribution (%)");
186
+
187
+ def plot_eigenvectors(self,i_start, i_end,**kwargs):
188
+ """
189
+ Plots the several eigenvectors U with indices in [i_start, i_end]
190
+ Parameters
191
+ ----------
192
+ i_start: int, the first eigenvector to plot
193
+ i_end: int the last eigenvector to plot
194
+ **kwargs some additional parameters for visualization functions of pyplot
195
+ Returns
196
+ -------
197
+ No output
198
+ """
199
+ plt.figure(figsize=(25, 25),**kwargs)
200
+ for i in range(i_start, i_end):
201
+ if i_end%2!=0:
202
+ plt.subplot(2,i_end//2+1, i+1-i_start,**kwargs)
203
+ else:
204
+ plt.subplot(2,i_end//2 , i+1-i_start,**kwargs)
205
+
206
+ title = r" $\mathbf{U}_{" + str(i) + "} $" +f' {self.rel_contribution[i]} %'
207
+ plt.plot(self.U[:, i],**kwargs)
208
+ plt.title(title)
209
+ plt.tight_layout()
210
+
211
+
212
+ def construct_hankel_weights(self):
213
+ """
214
+ Constructs hankel weights for the weighted correlation matrix
215
+ Parameters
216
+ ----------
217
+
218
+ Returns
219
+ -------
220
+ w: numpy.array, weights used further for the computation of the weighted correlation matrix
221
+ """
222
+ L_ = np.minimum(self.L, self.K)
223
+ K_ = np.maximum(self.L, self.K)
224
+
225
+ weights = []
226
+ for i in range(self.N):
227
+ if i <= (L_ - 1):
228
+ weights.append(i+1)
229
+ elif i <= K_:
230
+ weights.append(L_)
231
+ else:
232
+ weights.append(self.N - i)
233
+
234
+ weights = np.array(weights)
235
+ return weights
236
+
237
+ def compute_weighted_correlation_matrix(self):
238
+ """
239
+ Computes the weighted correlation matrix used for component grouping
240
+ Parameters
241
+ ----------
242
+
243
+ Returns
244
+ -------
245
+ Wcorr: numpy.array, weighted correlation matrix used for component grouping
246
+ """
247
+ w = self.construct_hankel_weights()
248
+
249
+ TS_elem = np.zeros((self.N,self.d)).T
250
+ for s in range(self.S):
251
+ TS_elem += np.array([self.X_to_TS(self.X_elem[i,:,s*self.K:(s+1)*self.K ]) for i in range(self.d)])
252
+
253
+ TS_wnorms = np.array([w.dot((TS_elem[i]**2)) for i in range(self.d)])
254
+ TS_wnorms = TS_wnorms**-0.5
255
+ Wcorr = np.identity(self.d)
256
+ for i in range(self.d):
257
+ for j in range(i+1,self.d):
258
+ Wcorr[i,j] = abs(w.dot(TS_elem[i] * TS_elem[j])*TS_wnorms[i] * TS_wnorms[j])
259
+ Wcorr[j,i] = Wcorr[i,j]
260
+ return Wcorr
261
+
262
+ def plot_weighted_correlation_matrix(self):
263
+ """
264
+ Plots the weighted correlation matrix used for component grouping
265
+ Parameters
266
+ ----------
267
+
268
+ Returns
269
+ -------
270
+ None
271
+ """
272
+ W_corr = self.compute_weighted_correlation_matrix()
273
+ ax = plt.imshow(W_corr)
274
+ plt.xlabel(r"$\tilde{Ts}_i$")
275
+ plt.ylabel(r"$\tilde{Ts}_j$")
276
+ plt.colorbar(ax.colorbar, fraction=0.045)
277
+ ax.colorbar.set_label("$W_{ij}$")
278
+ plt.xlim(0,self.d-0.5)
279
+ plt.ylim(self.d-0.5,0)
280
+ plt.xticks(np.arange(self.d))
281
+ plt.yticks(np.arange(self.d))
282
+ plt.clim(0,1)
283
+ plt.title(f"The Weighted Correlation Matrix for the Time Series ");
284
+
285
+
286
+
287
+ def reconstruct_ts(self, idx_chosen_components, return_as_df=False):
288
+ """
289
+ Reconstructs the time series from the chosen components
290
+ Parameters
291
+ ----------
292
+ idx_chosen_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components used for the reconstruction
293
+ return_as_df:bool, whether to return the resulting reconstructed time series as pandas.DataFrame
294
+
295
+ Returns
296
+ -------
297
+ ts_rec: numpy.array or pandas.DataFrame, reconstructed time series
298
+ """
299
+ chosen_components = self.X_elem[0,:,self.K]
300
+ chosen_components = 0
301
+ for i in idx_chosen_components:
302
+ chosen_components += self.X_elem[i,:,:]
303
+
304
+
305
+ ts_rec = self.X_s
306
+ ts_rec[:,:] = 0
307
+ for s in range(0,self.S):
308
+ ts_rec[:,s] = self.X_to_TS(chosen_components[:,s*self.K:(s+1)*self.K])
309
+
310
+ if return_as_df==True:
311
+ return pd.DataFrame(columns=self.df.columns, data=np.column_stack([self.df.iloc[:,:self.idx_start_ts ].values,ts_rec.T ]))
312
+ return ts_rec.T
313
+
314
+
315
+
316
+
317
+ def estimate_LRR(self, idx_components):
318
+ """
319
+ Estimates Linear Recurrence Relations(LRR) coefficients for the MSSA, which is used for forecasting
320
+ Parameters
321
+ ----------
322
+ idx_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components
323
+
324
+ Returns
325
+ -------
326
+ R: numpy.array, Linear Recurrence Relations(LRR) coefficients
327
+ """
328
+
329
+
330
+ P_orth = sp.linalg.qr(self.U[:,:self.d])[0]#self.L
331
+ nu_sq = np.sum(P_orth[-1,idx_components]**2)
332
+
333
+ if nu_sq !=1:
334
+ R = 1/(1-nu_sq) * (P_orth[:-1,idx_components] @ P_orth[-1,idx_components] )
335
+
336
+
337
+ return R
338
+ else :
339
+ print(nu_sq)
340
+
341
+ def L_Forecast(self, ts, M, idx_components, mode='forward'):
342
+ """
343
+ Forecasts or estimates M values for a given time series using LRR
344
+ Parameters
345
+ ----------
346
+ idx_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components
347
+ ts: numpy.array, input time series
348
+ M:int, number of values to forecast or estimate
349
+ mode:str, forecasts M future values for S time series if mode is "forward", or estimates the last M values for S input time series, if mode is 'retrospective'
350
+
351
+ Returns
352
+ -------
353
+ y_pred: numpy.array, original time series + M forecasted values, or original time series, where the last M values are estimated
354
+ """
355
+ R = self.estimate_LRR(idx_components)
356
+ R = R.reshape(-1,1)
357
+ if M<=0:
358
+ y_pred = ts[:,:self.N]
359
+ return y_pred
360
+
361
+ if mode == 'forward':
362
+ y_pred = np.zeros((ts.shape[0],self.N+M))
363
+ y_pred[:,:self.N] = ts[:,:self.N]
364
+
365
+ for m in range(0,M):
366
+ y_pred[:,self.N+m] = (y_pred[:,self.N-self.L+m+1:y_pred.shape[1]-M+m]@R).flatten()
367
+
368
+ elif mode == 'retrospective':
369
+ y_pred = np.zeros((ts.shape[0],self.N))
370
+ y_pred[:,:self.N-M] = ts[:,:self.N-M]
371
+
372
+ for m in range(0,M):
373
+
374
+ y_pred[:,self.N+m-M] = (y_pred[:,self.N-self.L+m+1-M:y_pred.shape[1]-M+m] @ R).flatten()
375
+
376
+
377
+ else:
378
+
379
+ raise ValueError('Wrong type of the forecasting mode')
380
+
381
+
382
+
383
+ return y_pred
384
+
385
+ def estimate_ESPRIT(self, idx_components=[0], decompose_rho_omega=False):
386
+
387
+ """
388
+ Estimates polynomial roots of the signal using ESPRIT algorithm and LS
389
+ Parameters
390
+ ----------
391
+ idx_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components used
392
+ decompose_rho_omega: bool, decompose the roots into real and imaginery part
393
+ Returns
394
+ -------
395
+ mu: numpy.array, complex polynomial roots
396
+ rho: numpy.array, real polynomial roots
397
+ omega: numpy.array, complex part polynomial roots
398
+ """
399
+ # P_orth = self.U[:,idx_components]
400
+
401
+ P_orth = sp.linalg.qr(self.U[:,:self.L])[0]
402
+
403
+ P_ = P_orth[:-1,idx_components] #last row removed
404
+ _P = P_orth[1:,idx_components] #first row removed
405
+
406
+ Inv_ = np.linalg.inv(P_.T @ P_) @ P_.T
407
+ MM = Inv_ @ _P
408
+ mu = np.flip(np.sort( np.linalg.eigvals(MM)))
409
+ if decompose_rho_omega == True:
410
+ rho = np.imag(mu)
411
+ omega = np.real(mu)
412
+ return mu, rho, omega
413
+ else:
414
+ return mu
415
+
416
+ def plot_polynomial_roots(self, idx_components):
417
+ """
418
+ Plots estimated polynomial roots of the signal using ESPRIT algorithm and LS
419
+ Parameters
420
+ ----------
421
+ idx_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components used
422
+ decompose_rho_omega: bool, decompose the roots into real and imaginery part
423
+ Returns
424
+ -------
425
+
426
+ """
427
+ _,rho, omega = self.estimate_ESPRIT(idx_components=idx_components, decompose_rho_omega=True )
428
+ fig, ax = plt.subplots()
429
+ unit_circle = plt.Circle((0, 0), 1, color='b', fill=False)
430
+ ax.add_patch(unit_circle)
431
+
432
+ plt.title("Polynomial roots on the unit circle")
433
+ ax.plot( omega, rho, "r*")
434
+ plt.gca().set_aspect('equal')
435
+ ax.set_xlabel('Real Part')
436
+ ax.set_ylabel('Imaginary Part')
437
+ plt.show()
438
+
py_ssa_lib/SSA.py ADDED
@@ -0,0 +1,464 @@
1
+ import pandas as pd
2
+ import numpy as np
3
+ import matplotlib.pyplot as plt
4
+ import scipy as sp
5
+ from sklearn.utils.extmath import randomized_svd
6
+ from matplotlib.ticker import MaxNLocator
7
+
8
+
9
+ class SSA():
10
+ """
11
+ Creates an instance of the SSA object
12
+
13
+ Parameters
14
+ ----------
15
+ Verbose: bool, outputs parameters used for an instance
16
+
17
+ Returns
18
+ -------
19
+ object of class SSA
20
+ """
21
+
22
+ def __init__(self,Verbose=False):
23
+ self.Verbose = Verbose
24
+ if self.Verbose==True:
25
+ print("Instance is created")
26
+
27
+
28
+
29
+
30
+ def construct_trajectory_matrix(self):
31
+ """
32
+ Constructs a trajectory matrix from a lagged versions of the time series
33
+
34
+ Parameters
35
+ ----------
36
+ Takes arguments from the instance
37
+
38
+ Returns
39
+ -------
40
+ X:numpy.array, representing the trajectory matrix
41
+ """
42
+ X = np.column_stack([self.X_s[i:i+self.L] for i in range(0,self.K)])
43
+ return X
44
+
45
+ def decompose_trajectory_matrix(self,**kwargs):
46
+ """
47
+ Decomposes a trajectory matrix using full svd or randomized svd
48
+
49
+ Parameters
50
+ ----------
51
+ Takes arguments from the instance
52
+ **kwargs for the svd routine
53
+
54
+ Returns
55
+ -------
56
+ U,Sigma, V.T: all are numpy.arrays, representing the left-hand side and right-hand side eigenvectors and
57
+ corresponding eigenvalues
58
+ """
59
+ if self.decomposition == "svd":
60
+ if self.Verbose==True:
61
+ print("Using full SVD")
62
+
63
+ U, Sigma, V = np.linalg.svd(self.X_ss,**kwargs)
64
+ self.d = np.linalg.matrix_rank(self.X_ss)
65
+ #self.d = np.max(np.where(Sigma>0))
66
+ elif self.decomposition == "rand_svd" :
67
+ if self.Verbose==True:
68
+ print("Using randomized SVD ")
69
+ self.d = self.L // 2 - 1
70
+ U, Sigma, V = randomized_svd(self.X_ss,n_components=self.L - self.L//3 ,n_oversamples=100, random_state=0,power_iteration_normalizer='LU',n_iter=15)
71
+
72
+ else:
73
+ self.d = 1
74
+ raise ValueError("Wrong decomposition type")
75
+ return U, Sigma, V.T
76
+
77
+ def elementary_matrix(self):
78
+ """
79
+ Constructs a matrix(tensor) of all elementary components
80
+
81
+ Parameters
82
+ ----------
83
+ Takes arguments from the instance
84
+
85
+ Returns
86
+ -------
87
+ X_elem:numpy.array, representing the matrix(tensor) of all elementary components
88
+ """
89
+
90
+ X_elem = np.array( [self.Sigma[i] * np.outer(self.U[:,i], self.V[:,i]) for i in range(0,self.d)] )
91
+ return X_elem
92
+
93
+ def X_to_TS(self, X_i):
94
+ """
95
+ Averages the anti-diagonals of the given elementary matrix, X_i,
96
+ and returns a reconstructed time series for the given component X_i.
97
+
98
+ Parameters
99
+ ----------
100
+ X_i: numpy.array, elementary matrix for the given component
101
+
102
+ Returns
103
+ -------
104
+ rec_ts: numpy.array, reconstructed time series for the given component X_i
105
+ """
106
+ # Reverse the column ordering of X_i
107
+ X_rev = X_i[::-1]
108
+ rec_ts = np.array([X_rev.diagonal(i).mean() for i in range(-X_i.shape[0]+1, X_i.shape[1])])
109
+ return rec_ts
110
+
111
+ def fit(self, df, L,ts, decomposition,idx_start_ts, **kwargs ):
112
+ """
113
+ Fits the instance of SSA to the data
114
+ Parameters
115
+ ----------
116
+ df:pandas.DataFrame, data frame of the time series, it is a source of the data, used to infer the length of time series N
117
+ Dataframe should have the following structure:
118
+ (WIDE FORMAT)
119
+
120
+ L:int, Window Size, the most important parameter for the SSA.
121
+
122
+ decomposition:str, type of decomposition of the trajectory matrix.
123
+ Available options are "svd" meaning full svd-decomposition, and "rand_svd" meaning its
124
+ "truncated version". For SSA it is reasonable to use "rand_svd" for very large time series and high values of L
125
+
126
+ idx_start_ts:int, the first column index of the data frame where the first nummeric value occours,
127
+ i.e where the time series start(s). Used to cutoff irrelevant columns from the input data set.
128
+
129
+
130
+ Returns
131
+ -------
132
+ No output
133
+ """
134
+
135
+ self.df = df
136
+ self.idx_start_ts = idx_start_ts
137
+ self.ts_df = self.df.iloc[ts,self.idx_start_ts:].T
138
+ self.decomposition = decomposition
139
+ self.X_s = self.ts_df.to_numpy().astype('float64')
140
+
141
+ self.N = int(self.X_s.shape[0])
142
+ self.L = int(self.X_s.shape[0]/1.5) if (L == None) else L
143
+ self.K = int(self.N - self.L + 1 )
144
+
145
+ if self.Verbose==True:
146
+ print(f' N = {self.N}, K = {self.K}, L = {self.L}')
147
+
148
+ self.X_ss = self.construct_trajectory_matrix()
149
+ self.U, self.Sigma, self.V = self.decompose_trajectory_matrix(**kwargs)
150
+ self.X_elem = self.elementary_matrix()
151
+ self.sigma_sumsq = (self.Sigma**2).sum()
152
+ self.rel_contribution = self.Sigma**2 / self.sigma_sumsq * 100
153
+ self.cumsum_contr = (self.Sigma**2).cumsum() / self.sigma_sumsq * 100
154
+
155
+
156
+ def plot_2d(self,m,title="", **kwargs):
157
+ """
158
+ helper function for plotting elementary matrices
159
+ Parameters
160
+ ----------
161
+ m:numpy.array, the i-th elementary matrix
162
+ title:str, plot title
163
+ **kwargs some additional parameters for visualization functions of pyplot
164
+ Returns
165
+ -------
166
+ No output
167
+ """
168
+
169
+ plt.imshow(m,**kwargs)
170
+ plt.xticks([])
171
+ plt.yticks([])
172
+ plt.title(title)
173
+
174
+
175
+ def plot_elem_matrices(self, i_start, i_end,**kwargs):
176
+ """
177
+ Plots elementary matrices with indices in the range[ i_start, i_end]
178
+ Parameters
179
+ ----------
180
+ m:numpy.array, the i-th elementary matrix
181
+ i_start: int, the first elementary matrix to plot
182
+ i_end: int the last elementary matrix to plot
183
+ **kwargs some additional parameters for visualization functions of pyplot
184
+ **kwargs some additional parameters for visualization functions of pyplot
185
+ Returns
186
+ -------
187
+ No output
188
+ """
189
+ for i in range(i_start, i_end):
190
+ if i_end%3!=0:
191
+ plt.subplot(3,i_end//3+1, i+1)
192
+ else:
193
+ plt.subplot(3,i_end//3 , i+1)
194
+
195
+ title = r"$\mathbf{X}_{" + str(i) + "}$"
196
+ self.plot_2d(self.X_elem[i], title,**kwargs)
197
+ plt.tight_layout()
198
+
199
+
200
+ def plot_eigenvals_contribution(self,**kwargs):
201
+ """
202
+ Plots the contribution of eigenvalues
203
+ Parameters
204
+ ----------
205
+ **kwargs some additional parameters for visualization functions of pyplot
206
+ Returns
207
+ -------
208
+ No output
209
+ """
210
+
211
+
212
+ fig, ax = plt.subplots(1, 2, figsize=(14,5),**kwargs)
213
+ ax[0].plot(self.rel_contribution , lw=2.5,**kwargs)
214
+ ax[0].set_xlim(0, self.d)
215
+ ax[0].grid()
216
+ ax[0].set_title(r"Relative Contribution of $\mathbf{X}_i$ to Trajectory Matrix")
217
+ ax[0].set_xlabel(r"$i$")
218
+ ax[0].set_ylabel("Contribution (%)")
219
+ ax[1].plot(self.cumsum_contr, lw=2.5,**kwargs)
220
+ ax[1].set_xlim(0,self.d)
221
+ ax[1].set_title(r"Cumulative Contribution of $\mathbf{X}_i$ to Trajectory Matrix")
222
+ ax[1].set_xlabel(r"$i$")
223
+ ax[1].grid()
224
+ ax[1].set_ylabel(r"Contribution (%)");
225
+
226
+ def plot_eigenvectors(self,i_start, i_end,**kwargs):
227
+ """
228
+ Plots the several eigenvectors U with indices in [i_start, i_end]
229
+ Parameters
230
+ ----------
231
+ i_start: int, the first eigenvector to plot
232
+ i_end: int the last eigenvector to plot
233
+ **kwargs some additional parameters for visualization functions of pyplot
234
+ Returns
235
+ -------
236
+ No output
237
+ """
238
+ plt.figure(figsize=(25, 25))
239
+ for i in range(i_start, i_end):
240
+ if i_end%2!=0:
241
+ plt.subplot(2,i_end//2+1, i+1-i_start,**kwargs)
242
+ else:
243
+ plt.subplot(2,i_end//2 , i+1-i_start,**kwargs)
244
+
245
+ title = r" $\mathbf{U}_{" + str(i) + "} $" +f' {self.rel_contribution[i]} %'
246
+ plt.plot(self.U[:, i],**kwargs)
247
+ plt.title(title)
248
+ plt.tight_layout()
249
+
250
+ def construct_hankel_weights(self):
251
+ """
252
+ Constructs hankel weights for the weighted correlation matrix
253
+ Parameters
254
+ ----------
255
+
256
+ Returns
257
+ -------
258
+ w: numpy.array, weights used further for the computation of the weighted correlation matrix
259
+ """
260
+ L_ = np.minimum(self.L, self.K)
261
+ K_ = np.maximum(self.L, self.K)
262
+
263
+ weights = []
264
+ for i in range(self.N):
265
+ if i <= (L_ - 1):
266
+ weights.append(i+1)
267
+ elif i <= K_:
268
+ weights.append(L_)
269
+ else:
270
+ weights.append(self.N - i)
271
+
272
+ weights = np.array(weights)
273
+ return weights
274
+
275
+ def compute_weighted_correlation_matrix(self):
276
+ """
277
+ Computes the weighted correlation matrix used for component grouping
278
+ Parameters
279
+ ----------
280
+
281
+ Returns
282
+ -------
283
+ Wcorr: numpy.array, weighted correlation matrix used for component grouping
284
+ """
285
+ w = self.construct_hankel_weights()
286
+ TS_elem = np.array([self.X_to_TS(self.X_elem[i,:,:]) for i in range(self.d)])
287
+ TS_wnorms = np.array([w.dot((TS_elem[i]**2)) for i in range(self.d)])
288
+ TS_wnorms = TS_wnorms**-0.5
289
+ Wcorr = np.identity(self.d)
290
+ print(TS_elem.shape)
291
+ for i in range(self.d):
292
+ for j in range(i+1,self.d):
293
+ Wcorr[i,j] = abs(w.dot(TS_elem[i] * TS_elem[j])*TS_wnorms[i] * TS_wnorms[j])
294
+ Wcorr[j,i] = Wcorr[i,j]
295
+ return Wcorr
296
+
297
+ def plot_weighted_correlation_matrix(self):
298
+ """
299
+ Plots the weighted correlation matrix used for component grouping
300
+ Parameters
301
+ ----------
302
+
303
+ Returns
304
+ -------
305
+ None
306
+ """
307
+ W_corr = self.compute_weighted_correlation_matrix()
308
+ ax = plt.imshow(W_corr)
309
+ plt.xlabel(r"$\tilde{TS}_i$")
310
+ plt.ylabel(r"$\tilde{TS}_j$")
311
+ plt.colorbar(ax.colorbar, fraction=0.045)
312
+ ax.colorbar.set_label("$W_{ij}$")
313
+ plt.xlim(0,self.d-0.5)
314
+ plt.ylim(self.d-0.5,0)
315
+ plt.xticks(np.arange(self.d))
316
+ plt.yticks(np.arange(self.d))
317
+ plt.clim(0,1)
318
+ plt.title("The Weighted Correlation Matrix for the Time Series");
319
+
320
+ def reconstruct_ts(self, idx_chosen_components, return_as_df=False):
321
+ """
322
+ Reconstructs the time series from the chosen components
323
+ Parameters
324
+ ----------
325
+ idx_chosen_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components used for the reconstruction
326
+ return_as_df:bool, whether to return the resulting reconstructed time series as pandas.DataFrame
327
+
328
+ Returns
329
+ -------
330
+ ts_rec: numpy.array or pandas.DataFrame, reconstructed time series
331
+ """
332
+
333
+ chosen_components = self.X_elem[0]
334
+ chosen_components = 0
335
+ for i in idx_chosen_components:
336
+ chosen_components += self.X_elem[i,:,:]
337
+
338
+
339
+ ts_rec = self.X_to_TS(chosen_components)
340
+ if return_as_df==True:
341
+ return pd.DataFrame(columns=self.df.columns, data=np.column_stack([self.df.iloc[:,:self.idx_start_ts].values,ts_rec.T ]))
342
+ return ts_rec.T
343
+
344
+
345
+
346
+
347
+ def estimate_LRR(self, idx_components):
348
+ """
349
+ Estimates Linear Recurrence Relations(LRR) coefficients for the MSSA, which is used for forecasting
350
+ Parameters
351
+ ----------
352
+ idx_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components
353
+
354
+ Returns
355
+ -------
356
+ R: numpy.array, Linear Recurrence Relations(LRR) coefficients
357
+ """
358
+ # P_orth = self.U[:,idx_components]
359
+ # P_orth = gram_schmidt(self.U[:,idx_components])
360
+ P_orth = sp.linalg.qr(self.U[:,:self.d])[0]#self.L
361
+ nu_sq = np.sum(P_orth[-1,idx_components]**2)
362
+
363
+ if nu_sq !=1:
364
+ R = 1/(1-nu_sq) * (P_orth[:-1,idx_components] @ P_orth[-1,idx_components] )
365
+
366
+
367
+ return R
368
+ else :
369
+ print(nu_sq)
370
+
371
+ def L_Forecast(self, ts, M, idx_components, mode='forward'):
372
+ """
373
+ Forecasts or estimates M values for a given time series using LRR
374
+ Parameters
375
+ ----------
376
+ idx_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components
377
+ ts: numpy.array, input time series
378
+ M:int, number of values to forecast or estimate
379
+ mode:str, forecasts M future values for S time series if mode is "forward", or estimates the last M values for S input time series, if mode is 'retrospective'
380
+
381
+ Returns
382
+ -------
383
+ y_pred: numpy.array, original time series + M forecasted values, or original time series, where the last M values are estimated
384
+ """
385
+ R = self.estimate_LRR(idx_components)
386
+ R = R.reshape(-1,1)
387
+ if M<=0:
388
+ y_pred = ts[:self.N]
389
+ return y_pred
390
+
391
+ if mode == 'forward':
392
+ y_pred = np.zeros((1,self.N+M))
393
+ y_pred[0,:self.N] = ts[:self.N]
394
+ for m in range(0,M):
395
+
396
+ y_pred[:,self.N+m] = (y_pred[:,self.N-self.L+m+1:y_pred.shape[0]-M+m-1]) @ R
397
+ elif mode == 'retrospective':
398
+ y_pred = np.zeros((1,self.N))
399
+ y_pred[0,:self.N-M] = ts[:self.N-M]
400
+ for m in range(0,M):
401
+
402
+ y_pred[:,self.N+m-M] = (y_pred[:,self.N-self.L+m+1-M:y_pred.shape[0]-M+m-1]) @ R
403
+
404
+
405
+ else:
406
+
407
+ raise ValueError('Wrong type of the forecasting mode')
408
+
409
+
410
+
411
+ return y_pred
412
+
413
+ def estimate_ESPRIT(self, idx_components=[0], decompose_rho_omega=False):
414
+ """
415
+ Estimates polynomial roots of the signal using ESPRIT algorithm and LS
416
+ Parameters
417
+ ----------
418
+ idx_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components used
419
+ decompose_rho_omega: bool, decompose the roots into real and imaginery part
420
+ Returns
421
+ -------
422
+ mu: numpy.array, complex polynomial roots
423
+ rho: numpy.array, real polynomial roots
424
+ omega: numpy.array, complex part polynomial roots
425
+ """
426
+ # P_orth = self.U[:,idx_components]
427
+
428
+ P_orth = sp.linalg.qr(self.U[:,:self.L])[0]
429
+
430
+ P_ = P_orth[:-1,idx_components] #last row removed
431
+ _P = P_orth[1:,idx_components] #first row removed
432
+
433
+ Inv_ = np.linalg.inv(P_.T @ P_) @ P_.T
434
+ MM = Inv_ @ _P
435
+ mu = np.flip(np.sort( np.linalg.eigvals(MM)))
436
+ if decompose_rho_omega == True:
437
+ rho = np.imag(mu)
438
+ omega = np.real(mu)
439
+ return mu, rho, omega
440
+ else:
441
+ return mu
442
+
443
+ def plot_polynomial_roots(self, idx_components):
444
+ """
445
+ Plots estimated polynomial roots of the signal using ESPRIT algorithm and LS
446
+ Parameters
447
+ ----------
448
+ idx_components:list or numpy.arange of positive integer numbers, denotes the indices of elementary components used
449
+ decompose_rho_omega: bool, decompose the roots into real and imaginery part
450
+ Returns
451
+ -------
452
+ None
453
+ """
454
+ _,rho, omega = self.estimate_ESPRIT( idx_components=idx_components, decompose_rho_omega=True )
455
+ fig, ax = plt.subplots()
456
+ unit_circle = plt.Circle((0, 0), 1, color='b', fill=False)
457
+ ax.add_patch(unit_circle)
458
+
459
+ plt.title("Polynomial roots on the unit circle")
460
+ ax.plot( omega, rho, "r*")
461
+ plt.gca().set_aspect('equal')
462
+ ax.set_xlabel('Real Part')
463
+ ax.set_ylabel('Imaginary Part')
464
+ plt.show()
py_ssa_lib/__init__.py ADDED
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ ,Country,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008
2
+ 0,France,9.73804,9.7936,9.80209,9.78123,10.05206,10.4237,10.36194,10.58991,10.71493,10.85032,11.08966,10.99795,11.11784,11.30309,11.35252,11.37692,11.19392,11.29033
3
+ 1,Canada,11.11733,11.46716,11.70631,12.02414,12.21325,12.56482,12.66968,12.35699,12.97692,13.07669,12.87847,13.10786,13.52061,13.83128,14.16374,13.81736,14.07179,14.02923
4
+ 2,Germany,14.2997,14.0383,14.07232,14.01249,14.38346,14.39479,14.34024,14.32692,14.10906,14.26147,14.61945,14.32545,14.58721,14.70148,14.3995,14.65476,14.18592,14.35692
5
+ 3,China,28.1579,29.26608,30.03294,34.11046,34.7564,35.55399,37.74732,37.03964,36.51251,36.35203,38.41214,43.90988,51.15543,62.91903,68.24567,72.8906,78.00135,85.05974
6
+ 4,Netherlands,3.49513,3.46788,3.53898,3.50781,3.57542,3.73327,3.69939,3.69151,3.68246,3.79417,3.92984,3.93964,4.00102,4.11195,4.22233,4.13898,4.37748,4.32717
@@ -0,0 +1,15 @@
1
+ import pandas as pd
2
+ import os
3
+
4
+ def load_energy_consumption_df(rawDS=False):
5
+
6
+ dir_path = os.path.dirname(os.path.realpath(__file__))
7
+ if rawDS:
8
+ df_csv = os.path.join(dir_path,"total-primary-energy-consumption-csv-version-4.csv")
9
+ return pd.read_csv(filepath_or_buffer=df_csv , sep=",")
10
+ else:
11
+ df_csv = os.path.join(dir_path,"energy_consumption_df.csv")
12
+ return pd.read_csv(filepath_or_buffer=df_csv, sep=",")
13
+
14
+
15
+
@@ -0,0 +1,225 @@
1
+ Country,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008
2
+ Bermuda,0.00793,0.00686,0.00727,0.00771,0.00752,0.00741,0.007,0.00988,0.0108,0.01315,0.00928,0.00805,0.00647,0.00695,0.00743,0.00739,0.0075,0.00752,0.00752,0.00752,0.0075,0.00744,0.00752,0.00814,0.00869,0.00927,0.00922,0.01018,0.01017
3
+ Canada,9.6947,9.58952,9.20637,9.18989,9.78546,10.15278,10.25563,10.58943,11.05599,11.20252,10.97906,11.11733,11.46716,11.70631,12.02414,12.21325,12.56482,12.66968,12.35699,12.97692,13.07669,12.87847,13.10786,13.52061,13.83128,14.16374,13.81736,14.07179,14.02923
4
+ Greenland,0.00791,0.00746,0.00722,0.00505,0.00799,0.00714,0.00462,0.00335,0.00777,0.00671,0.00787,0.00779,0.00687,0.00708,0.00719,0.00719,0.00728,0.00746,0.00756,0.00756,0.00772,0.00796,0.00805,0.00809,0.00813,0.00829,0.00846,0.00826,0.00883
5
+ Mexico,3.72819,4.11969,4.33477,4.06414,4.18464,4.42001,4.36327,4.51142,4.58822,4.83663,4.70635,5.00522,5.10725,5.17674,5.37928,5.28936,5.51817,5.6835,5.98571,6.10047,6.37958,6.32931,6.32936,6.50563,6.48998,6.80188,7.36271,7.27651,7.30898
6
+ Saint Pierre and Miquelon,0.0022,0.00221,0.00203,0.00221,0.00216,0.00191,0.0024,0.00306,0.00319,0.00365,0.00359,0.00341,0.00318,0.00174,0.00183,0.00122,0.00121,0.00083,0.00096,0.00096,0.00105,0.00096,0.00096,0.00105,0.00113,0.00117,0.00118,0.00122,0.00125
7
+ United States,78.12376,76.1694,73.15332,73.03603,77.02972,76.7898,77.02183,79.43723,83.07769,85.17228,84.9096,84.88873,86.24994,87.89773,89.55607,91.46367,94.47994,95.03841,95.42194,97.11468,99.25385,96.53415,98.03879,98.31384,100.49743,100.60722,99.90566,101.67563,99.53011
8
+ Antarctica,0.00213,0.00213,0.00212,0.00213,0.0027,0.00304,0.00275,0.00283,0.00291,0.00288,0.00292,0.00305,0.00304,0.00304,0.00305,0.00314,0.00313,0.00314,0.00314,0.00314,0.00313,0.00318,0.00318,0.00327,0.00325,0.00348,0.00348,0.00335,0.00362
9
+ Antigua and Barbuda,0.00598,0.00531,0.00711,0.00415,0.0047,0.00461,0.00462,0.00564,0.0058,0.00582,0.00608,0.006,0.00598,0.00588,0.00661,0.00679,0.00677,0.00705,0.00705,0.00705,0.00725,0.00727,0.00732,0.00776,0.00836,0.00909,0.00927,0.00891,0.00931
10
+ Argentina,1.64042,1.59706,1.67295,1.69346,1.83705,1.74194,1.89743,1.95167,1.95689,1.94008,1.87411,1.9716,2.04718,1.9703,2.24293,2.31167,2.3942,2.46373,2.57501,2.60392,2.66834,2.61214,2.48152,2.6667,2.78017,2.95424,3.1205,3.2614,3.2942
11
+ Aruba,--,--,--,--,--,--,0.00146,0.00146,0.00556,0.00747,0.00787,0.00858,0.00921,0.0089,0.0104,0.01201,0.0079,0.01264,0.01277,0.01277,0.01349,0.01353,0.01353,0.01442,0.01452,0.01487,0.01597,0.01461,0.01496
12
+ "Bahamas, The",0.0599,0.06326,0.0541,0.04065,0.03669,0.03321,0.03275,0.03622,0.0338,0.03847,0.04116,0.0365,0.03061,0.02965,0.03625,0.04254,0.04778,0.04751,0.0536,0.04834,0.04749,0.0466,0.0469,0.0566,0.0572,0.0658,0.06591,0.06274,0.06832
13
+ Barbados,0.01446,0.0153,0.01527,0.01613,0.01555,0.01715,0.01826,0.01731,0.01645,0.01773,0.0184,0.01857,0.01877,0.01777,0.018,0.01844,0.0164,0.02033,0.02098,0.0215,0.02378,0.02293,0.02293,0.02335,0.01599,0.0216,0.0206,0.0187,0.02018
14
+ Belize,0.0033,0.00302,0.00283,0.00283,0.0031,0.0031,0.00379,0.00306,0.00221,0.0032,0.00453,0.00506,0.00433,0.00401,0.00408,0.00511,0.00454,0.00709,0.00706,0.00726,0.01033,0.01335,0.01273,0.01304,0.01392,0.01471,0.01597,0.01635,0.01676
15
+ Bolivia,0.07454,0.0834,0.07371,0.07562,0.07319,0.06694,0.06835,0.06706,0.07765,0.08738,0.09261,0.09142,0.09831,0.08471,0.10848,0.12355,0.12144,0.13574,0.12567,0.14125,0.16198,0.14539,0.15743,0.19905,0.20276,0.20148,0.22697,0.23411,0.25172
16
+ Brazil,4.02179,3.88321,3.94323,3.94192,4.30882,4.59267,4.9686,5.11182,5.29206,5.44799,5.75124,5.99391,6.08183,5.00428,6.61796,7.01667,7.44847,7.85007,8.10649,8.25282,8.52612,8.43611,8.55009,8.66095,8.99517,9.34698,9.68601,10.10456,10.62958
17
+ Cayman Islands,0.00144,0.00155,0.00155,0.00151,0.00155,0.00159,0.0016,0.00163,0.00382,0.00388,0.00396,0.00422,0.0043,0.00386,0.00445,0.00483,0.00486,0.00487,0.00496,0.00496,0.0049,0.00496,0.00496,0.00514,0.00551,0.00578,0.00657,0.00757,0.00696
18
+ Chile,0.42668,0.41949,0.37365,0.37945,0.39224,0.39888,0.38895,0.41039,0.44866,0.50603,0.56478,0.56348,0.60505,0.61029,0.69493,0.77018,0.8367,0.94607,0.93171,0.98852,1.01781,1.05766,1.06597,1.13777,1.20202,1.28702,1.31225,1.07515,1.2154
19
+ Colombia,0.69636,0.71547,0.76684,0.77864,0.85268,0.86345,0.90079,0.82399,0.91932,0.95303,0.88934,0.96592,0.97554,0.99902,1.09836,1.09355,1.18948,1.22775,1.23993,1.17954,1.17229,1.16377,1.16042,1.20275,1.21616,1.26857,1.28904,1.32615,1.37243
20
+ Costa Rica,0.05545,0.0572,0.0558,0.06133,0.05911,0.05935,0.05825,0.06449,0.06984,0.07579,0.0744,0.07934,0.08816,0.09278,0.10489,0.11038,0.11195,0.12377,0.12729,0.14126,0.15038,0.15489,0.1641,0.1699,0.17402,0.17334,0.18699,0.19668,0.19785
21
+ Cuba,0.45609,0.46394,0.50096,0.45969,0.47611,0.48449,0.50073,0.49287,0.50014,0.51006,0.49816,0.4597,0.40679,0.36866,0.40944,0.41726,0.42642,0.47073,0.44902,0.45473,0.45719,0.46389,0.46501,0.46394,0.45473,0.39888,0.35584,0.37119,0.41533
22
+ Dominica,0.00048,0.00061,0.0006,0.00067,0.00068,0.00073,0.00072,0.00077,0.00096,0.00101,0.00101,0.00101,0.00101,0.001,0.0012,0.00135,0.00135,0.00136,0.00147,0.00153,0.00148,0.00175,0.00191,0.00203,0.00188,0.00161,0.00198,0.00202,0.00212
23
+ Dominican Republic,0.08726,0.08641,0.09122,0.10872,0.09397,0.10676,0.10905,0.12611,0.13375,0.12745,0.13871,0.14123,0.14653,0.1285,0.14663,0.1591,0.17257,0.18202,0.18803,0.21785,0.23413,0.24307,0.25245,0.28601,0.27134,0.2718,0.28124,0.29402,0.29675
24
+ Ecuador,0.18651,0.19313,0.21098,0.19725,0.2079,0.2206,0.23703,0.2338,0.2423,0.2372,0.25381,0.26809,0.29819,0.25434,0.31462,0.30813,0.3324,0.34286,0.35013,0.33588,0.34462,0.3609,0.36515,0.37612,0.3921,0.40695,0.44359,0.47109,0.49731
25
+ El Salvador,0.04785,0.04533,0.04478,0.04861,0.04904,0.04968,0.05225,0.05144,0.05566,0.05657,0.05775,0.05714,0.06403,0.06067,0.07246,0.08856,0.0903,0.0913,0.10331,0.10964,0.10851,0.11455,0.11369,0.12329,0.12086,0.12701,0.13192,0.13624,0.13621
26
+ Falkland Islands (Islas Malvinas),0.00017,0.00017,0.00017,0.00017,0.00017,0.00022,0.00022,0.00022,0.00043,0.00039,0.00035,0.00035,0.00035,0.00035,0.00035,0.00039,0.00044,0.00048,0.00039,0.00039,0.00039,0.00039,0.00044,0.00044,0.00048,0.00052,0.00057,0.00065,0.00062
27
+ French Guiana,0.00515,0.00443,0.00565,0.00581,0.00463,0.00465,0.00542,0.00598,0.00706,0.00796,0.00951,0.01075,0.00861,0.01128,0.01169,0.01332,0.01329,0.01332,0.01355,0.01355,0.01369,0.01373,0.0141,0.01472,0.01425,0.01484,0.01498,0.01442,0.01419
28
+ Grenada,0.00067,0.00077,0.00085,0.00083,0.00085,0.00088,0.00098,0.00102,0.00111,0.00115,0.00178,0.00178,0.00183,0.00181,0.00237,0.00221,0.00244,0.00308,0.00278,0.00278,0.00181,0.00318,0.00345,0.00349,0.00352,0.00361,0.00381,0.00377,0.00414
29
+ Guadeloupe,0.00707,0.0101,0.01275,0.01339,0.01483,0.01341,0.01347,0.01536,0.01681,0.01884,0.02032,0.02128,0.01974,0.02111,0.02366,0.02428,0.02404,0.02445,0.02445,0.02445,0.02581,0.02628,0.02672,0.02777,0.02835,0.02976,0.03126,0.03483,0.03306
30
+ Guatemala,0.06717,0.05719,0.05804,0.063,0.05405,0.06058,0.06525,0.06536,0.07126,0.07487,0.08067,0.07871,0.08572,0.08497,0.10377,0.10762,0.11619,0.12913,0.14244,0.15069,0.15534,0.16712,0.16601,0.17453,0.18105,0.19806,0.20622,0.21499,0.20642
31
+ Guyana,0.02142,0.02434,0.01956,0.01726,0.01973,0.02005,0.01933,0.0147,0.01461,0.00977,0.00942,0.01085,0.01239,0.01523,0.01556,0.0133,0.01421,0.01557,0.0197,0.02096,0.0229,0.02354,0.02393,0.02341,0.02101,0.02313,0.022,0.02186,0.02087
32
+ Haiti,0.015,0.01088,0.0143,0.01285,0.01307,0.01495,0.01467,0.0213,0.02316,0.02134,0.01413,0.01418,0.01531,0.01099,0.01,0.01564,0.01822,0.02185,0.02161,0.02341,0.02408,0.02601,0.02652,0.02639,0.02686,0.02719,0.02785,0.02907,0.02957
33
+ Honduras,0.03317,0.03085,0.0315,0.0329,0.03382,0.03222,0.03763,0.03635,0.04547,0.05259,0.0593,0.05895,0.06051,0.05982,0.0609,0.06496,0.07339,0.07457,0.08028,0.08749,0.08601,0.09293,0.09774,0.10037,0.10915,0.11653,0.12612,0.13809,0.13316
34
+ Jamaica,0.11805,0.09955,0.08658,0.09239,0.07545,0.06769,0.06822,0.07341,0.08471,0.09729,0.10342,0.10546,0.11563,0.11283,0.12189,0.13437,0.13774,0.14501,0.14798,0.15216,0.14631,0.14713,0.15121,0.15735,0.15908,0.15319,0.17203,0.18094,0.17164
35
+ Martinique,0.00934,0.00919,0.00917,0.00906,0.00813,0.00979,0.01053,0.01194,0.01429,0.02028,0.02189,0.01806,0.02012,0.02504,0.02706,0.02766,0.02769,0.02772,0.02777,0.02777,0.02815,0.02841,0.02879,0.03002,0.03085,0.03264,0.03257,0.0338,0.03359
36
+ Montserrat,0.00026,0.00028,0.00028,0.00028,0.00028,0.00031,0.00031,0.00035,0.0004,0.0004,0.00053,0.00049,0.00057,0.00057,0.00057,0.00066,0.00062,0.00066,0.00071,0.00071,0.00075,0.00075,0.00075,0.00084,0.00092,0.00097,0.00106,0.00115,0.00128
37
+ Netherlands Antilles,0.23781,0.22241,0.21486,0.19761,0.18614,0.15532,0.1517,0.15405,0.14343,0.15139,0.14774,0.14015,0.13817,0.11234,0.14497,0.15282,0.15243,0.16181,0.16155,0.15593,0.15562,0.15753,0.15079,0.14447,0.14518,0.15288,0.16006,0.16834,0.16472
38
+ Nicaragua,0.03277,0.03356,0.03337,0.03243,0.03494,0.0391,0.0383,0.03915,0.03866,0.04386,0.04126,0.04021,0.04461,0.04185,0.04569,0.04828,0.04986,0.05075,0.05376,0.05777,0.05702,0.0612,0.06272,0.06472,0.06868,0.07328,0.07308,0.0752,0.07572
39
+ Panama,0.18343,0.18621,0.17593,0.17807,0.18243,0.16576,0.17099,0.17813,0.1752,0.17082,0.18056,0.17942,0.18147,0.17562,0.20396,0.21581,0.1933,0.19883,0.20817,0.20489,0.20636,0.20343,0.20283,0.19681,0.22719,0.2202,0.22937,0.23497,0.2387
40
+ Paraguay,0.0279,0.02715,0.02639,0.02846,0.03129,0.05515,0.11264,0.1677,0.17444,0.21662,0.23076,0.2449,0.23047,0.25682,0.30165,0.34792,0.36317,0.40086,0.40787,0.42376,0.42971,0.37938,0.39444,0.4241,0.41508,0.40976,0.42508,0.4253,0.43799
41
+ Peru,0.40399,0.43033,0.42903,0.40122,0.41196,0.41853,0.4496,0.45514,0.45353,0.40696,0.38488,0.38174,0.37597,0.39737,0.45226,0.47396,0.50352,0.48603,0.503,0.51295,0.52865,0.53767,0.54603,0.55724,0.57425,0.60342,0.65921,0.65862,0.69404
42
+ Puerto Rico,0.42761,0.45014,0.33107,0.3207,0.35934,0.31086,0.33724,0.35071,0.3202,0.3123,0.30014,0.37303,0.33257,0.30891,0.35589,0.36377,0.37427,0.38432,0.39356,0.40469,0.44138,0.47957,0.48281,0.51986,0.53042,0.51355,0.51434,0.42645,0.38902
43
+ Saint Kitts and Nevis,0.00075,0.00079,0.00091,0.00074,0.00075,0.00075,0.00075,0.00079,0.00092,0.00092,0.00092,0.00106,0.00105,0.00118,0.00141,0.00128,0.00145,0.00145,0.00145,0.00145,0.00145,0.00145,0.00145,0.00163,0.00179,0.00189,0.00249,0.00354,0.00375
44
+ Saint Lucia,0.00164,0.0013,0.00155,0.00143,0.00143,0.00176,0.00177,0.00198,0.00242,0.00243,0.00243,0.00243,0.00251,0.00229,0.00278,0.00283,0.00282,0.00296,0.00296,0.00296,0.00471,0.00494,0.00504,0.00552,0.00533,0.00532,0.00548,0.00577,0.00607
45
+ Saint Vincent/Grenadines,0.00073,0.00069,0.00074,0.00074,0.00074,0.00085,0.00087,0.00095,0.00112,0.00149,0.00141,0.00125,0.0014,0.00125,0.002,0.00209,0.00208,0.00221,0.00261,0.00261,0.00269,0.00268,0.00284,0.00296,0.00318,0.00317,0.0031,0.00314,0.0036
46
+ Suriname,0.04058,0.03563,0.03487,0.0247,0.02339,0.02843,0.02605,0.01907,0.02224,0.03013,0.03454,0.03523,0.03449,0.03413,0.03533,0.03394,0.03357,0.03409,0.03431,0.03452,0.02927,0.03074,0.032,0.03275,0.03364,0.03496,0.03608,0.03571,0.03522
47
+ Trinidad and Tobago,0.17413,0.16712,0.16779,0.18491,0.25078,0.27406,0.20582,0.19155,0.19772,0.21256,0.22625,0.25307,0.24796,0.26418,0.31131,0.32537,0.35886,0.38909,0.38749,0.39859,0.42054,0.47353,0.49997,0.53888,0.58999,0.67326,0.82111,0.824,0.88726
48
+ Turks and Caicos Islands,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.00019,0.00019,0.00019,0.00021,0.00021,0.00039,0.00023,0.00018,0.00018,0.00017,0.00018,0.00017,0.001,0.00106
49
+ Uruguay,0.10946,0.10379,0.09886,0.12048,0.11735,0.10893,0.11437,0.12222,0.11928,0.10523,0.13405,0.11954,0.13678,0.13008,0.13835,0.12467,0.12877,0.14178,0.17745,0.15963,0.16442,0.16216,0.1684,0.16332,0.14094,0.15674,0.14874,0.1777,0.16634
50
+ Venezuela,1.5883,1.72323,1.7466,1.6837,1.71362,1.74239,1.88679,1.92305,1.93668,2.06224,2.08687,2.21113,2.2178,2.06923,2.43677,2.46985,2.57638,2.66169,2.85389,2.73112,2.76891,3.03054,2.93435,2.72292,2.93095,2.89477,3.16788,3.07123,3.19277
51
+ "Virgin Islands, U.S.",0.24982,0.22395,0.16259,0.1143,0.13365,0.1496,0.09966,0.11733,0.08209,0.12507,0.11595,0.11875,0.12131,0.08506,0.12289,0.12184,0.12054,0.12303,0.12754,0.13189,0.13864,0.19195,0.19075,0.22458,0.23458,0.22889,0.23891,0.21603,0.36419
52
+ "Virgin Islands, British",0.00032,0.00051,0.00051,0.00051,0.00047,0.00048,0.00053,0.00062,0.00066,0.0007,0.0007,0.0007,0.00075,0.00075,0.00075,0.00075,0.00084,0.00084,0.00084,0.00084,0.00084,0.00084,0.00084,0.00097,0.00123,0.00132,0.00141,0.00153,0.00163
53
+ Albania,0.15475,0.15461,0.15416,0.15878,0.16072,0.16086,0.15769,0.1573,0.16167,0.1503,0.10797,0.09283,0.08337,0.05894,0.0692,0.07627,0.08487,0.07729,0.08352,0.09466,0.09619,0.0916,0.09516,0.11449,0.11651,0.12092,0.11852,0.10319,0.11139
54
+ Austria,1.09577,1.08623,1.03457,1.04021,1.06518,1.08788,1.08336,1.03252,1.11489,1.13012,1.16401,1.22195,1.19959,1.23994,1.23205,1.28761,1.33732,1.35279,1.37867,1.38264,1.39225,1.4488,1.45907,1.47842,1.51339,1.55886,1.53192,1.51931,1.51893
55
+ Belgium,2.06423,2.05095,1.93514,1.84186,1.90722,2.00146,2.0658,2.10008,2.09054,2.15121,2.18858,2.27396,2.23895,2.24139,2.37563,2.43831,2.58635,2.64536,2.69771,2.65446,2.73311,2.70175,2.67853,2.7814,2.80681,2.77775,2.75463,2.75026,2.91264
56
+ Bosnia and Herzegovina,--,--,--,--,--,--,--,--,--,--,--,--,0.2585,0.19454,0.10419,0.17611,0.11437,0.15959,0.18607,0.19127,0.22358,0.22521,0.2316,0.22736,0.25338,0.27217,0.28281,0.27484,0.29655
57
+ Bulgaria,1.32139,1.31357,1.35888,1.37968,1.39121,1.42884,1.41493,1.40928,1.40933,1.31732,1.18045,0.91293,0.90167,0.80713,0.84447,0.92138,0.94847,0.91626,0.84782,0.77173,0.86772,0.90417,0.87459,0.88654,0.87473,0.91486,0.93661,0.83888,0.83362
58
+ Croatia,--,--,--,--,--,--,--,--,--,--,--,--,0.31231,0.30039,0.33778,0.34423,0.34821,0.35472,0.37228,0.37461,0.3756,0.38411,0.37378,0.39311,0.40816,0.40418,0.41522,0.39504,0.40804
59
+ Cyprus,0.04202,0.03622,0.03868,0.04296,0.04405,0.04677,0.04851,0.05427,0.05423,0.06548,0.06967,0.07014,0.08134,0.07297,0.09299,0.09256,0.09056,0.09221,0.09985,0.10526,0.10312,0.1125,0.11064,0.11157,0.11762,0.11983,0.12624,0.12655,0.13271
60
+ Czech Republic,--,--,--,--,--,--,--,--,--,--,--,--,--,1.60246,1.54047,1.56479,1.65331,1.46253,1.42235,1.33331,1.39554,1.44098,1.43969,1.50501,1.50207,1.5435,1.58777,1.63353,1.61454
61
+ Denmark,0.86306,0.74856,0.73866,0.69914,0.71871,0.814,0.81503,0.83236,0.80544,0.75262,0.76892,0.84468,0.79388,0.84068,0.87661,0.88285,0.97852,0.94141,0.92008,0.89262,0.87367,0.88601,0.85397,0.89504,0.86094,0.84177,0.89688,0.87437,0.83638
62
+ Faroe Islands,0.00663,0.00051,0.00051,0.00052,0.00051,0.00051,0.00764,0.00801,0.00848,0.0093,0.00995,0.0092,0.00927,0.00892,0.00934,0.00977,0.00994,0.01003,0.01008,0.01001,0.01022,0.01022,0.01048,0.01047,0.0106,0.01076,0.01158,0.01114,0.0109
63
+ Finland,0.97218,0.98988,0.90641,0.90382,0.94532,0.95667,0.98873,1.06452,1.06046,1.0708,1.06221,1.08104,1.13291,1.1435,1.18216,1.12728,1.14022,1.17451,1.22029,1.20869,1.21386,1.22696,1.24833,1.31852,1.34342,1.26036,1.32165,1.33039,1.29176
64
+ Former Czechoslovakia,2.74465,2.72524,2.71119,2.73763,2.78649,2.84149,2.92209,2.98359,2.89932,2.92965,2.90579,2.56486,2.38451,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--
65
+ Former Serbia and Montenegro,--,--,--,--,--,--,--,--,--,--,--,--,0.66429,0.53018,0.55562,0.47592,0.74418,0.75556,0.78056,0.62643,0.62744,0.66237,0.73842,0.73911,0.7587,0.71346,--,--,--
66
+ Former Yugoslavia,1.66547,1.74257,1.78375,1.82429,2.12645,2.19666,2.20724,2.22166,2.22773,2.23046,2.13426,1.90296,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--
67
+ France,8.38909,8.06741,7.79074,7.91212,8.17103,8.35013,8.48696,8.61162,8.59037,8.8754,9.12538,9.73804,9.7936,9.80209,9.78123,10.05206,10.4237,10.36194,10.58991,10.71493,10.85032,11.08966,10.99795,11.11784,11.30309,11.35252,11.37692,11.19392,11.29033
68
+ Germany,--,--,--,--,--,--,--,--,--,--,--,14.2997,14.0383,14.07232,14.01249,14.38346,14.39479,14.34024,14.32692,14.10906,14.26147,14.61945,14.32545,14.58721,14.70148,14.3995,14.65476,14.18592,14.35692
69
+ "Germany, East",3.59379,3.56468,3.60263,3.5452,3.60512,3.80455,3.8116,3.82739,3.81678,3.71624,3.39701,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--
70
+ "Germany, West",11.27028,10.76921,10.49559,10.49458,10.80876,11.02438,11.40743,11.40608,11.47327,11.1784,11.45953,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--
71
+ Gibraltar,0.00738,0.00827,0.00736,0.00581,0.0054,0.01246,0.01868,0.01898,0.02451,0.02104,0.02185,0.02252,0.03988,0.04068,0.04172,0.04181,0.04186,0.04181,0.04825,0.04203,0.09355,0.05126,0.05216,0.0535,0.05489,0.05644,0.05775,0.05952,0.05862
72
+ Greece,0.75171,0.74718,0.72815,0.74775,0.76807,0.80955,0.8371,0.89871,0.95805,1.00191,1.03854,1.05579,1.02018,1.07288,1.08676,1.12387,1.14503,1.19901,1.27411,1.26625,1.33768,1.35491,1.35923,1.43684,1.42652,1.43461,1.47776,1.49882,1.46983
73
+ Hungary,1.20988,1.20101,1.19572,1.20769,1.18712,1.23224,1.24268,1.27875,1.24853,1.24666,1.18178,1.13251,1.0554,1.02698,1.02834,1.03458,1.07006,1.04601,1.05271,1.05316,1.02466,1.05961,1.06095,1.085,1.08566,1.15757,1.14767,1.11145,1.10639
74
+ Iceland,0.05705,0.05767,0.06169,0.06483,0.06892,0.06811,0.07094,0.07345,0.07599,0.07932,0.08123,0.07891,0.08,0.08395,0.08544,0.08721,0.09399,0.09815,0.11028,0.12388,0.13282,0.13664,0.14062,0.14197,0.14447,0.14712,0.1697,0.20335,0.24983
75
+ Ireland,0.32304,0.31186,0.30854,0.29988,0.30755,0.31388,0.3391,0.33993,0.334,0.34706,0.36911,0.38463,0.39084,0.40326,0.42248,0.43219,0.45893,0.49145,0.5305,0.56483,0.60026,0.62838,0.62447,0.61718,0.64184,0.66185,0.69985,0.69122,0.68967
76
+ Italy,6.14607,6.02974,5.88893,5.77908,6.05167,6.06421,6.14533,6.37045,6.52629,6.71512,6.7643,6.91373,6.88253,6.87273,6.77679,7.08961,7.12058,7.23072,7.43861,7.55594,7.63411,7.67254,7.70383,7.96221,8.08083,8.13858,8.06973,7.94588,7.89699
77
+ Luxembourg,0.14196,0.12659,0.12047,0.11458,0.1236,0.12539,0.125,0.12419,0.12887,0.13777,0.14471,0.15656,0.15564,0.1626,0.15668,0.1392,0.14184,0.14121,0.13838,0.14596,0.15383,0.1604,0.17039,0.17942,0.19743,0.20122,0.20124,0.19898,0.19533
78
+ Macedonia,--,--,--,--,--,--,--,--,--,--,--,--,0.11972,0.12041,0.11189,0.11526,0.12501,0.12249,0.13989,0.12905,0.11505,0.10637,0.1066,0.11728,0.11939,0.12206,0.12084,0.11946,0.12464
79
+ Malta,0.01888,0.02056,0.02211,0.01587,0.02247,0.01833,0.021,0.02361,0.02654,0.02898,0.03049,0.03103,0.03098,0.03471,0.03589,0.03366,0.03497,0.03735,0.03905,0.04454,0.03919,0.0329,0.03939,0.03925,0.03973,0.04122,0.03904,0.04138,0.04234
80
+ Montenegro,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,0.03479,0.0358,0.03589
81
+ Netherlands,3.20474,3.00754,2.87238,2.81473,2.88151,3.00982,3.14317,3.23121,3.24029,3.25879,3.31087,3.49513,3.46788,3.53898,3.50781,3.57542,3.73327,3.69939,3.69151,3.68246,3.79417,3.92984,3.93964,4.00102,4.11195,4.22233,4.13898,4.37748,4.32717
82
+ Norway,1.34103,1.38834,1.34656,1.47001,1.53129,1.54751,1.54194,1.57291,1.60034,1.67164,1.71084,1.61974,1.71242,1.71051,1.68041,1.78545,1.68726,1.75187,1.80392,1.88517,1.95891,1.8712,1.93517,1.82061,1.89199,1.96814,1.80774,1.93547,1.94311
83
+ Poland,5.06796,4.57704,4.58383,4.59384,4.75503,4.91312,5.00005,5.16208,5.0579,4.86104,3.95008,3.87055,3.83451,3.96778,3.81633,3.70083,4.13988,4.08469,3.84843,3.97638,3.62424,3.45452,3.43849,3.57158,3.70203,3.67498,3.85212,3.85974,3.88691
84
+ Portugal,0.4315,0.36906,0.48664,0.50029,0.52869,0.53587,0.56928,0.58821,0.65132,0.70028,0.74739,0.74785,0.75644,0.76874,0.80827,0.84061,0.87644,0.91327,0.97411,1.02389,1.07038,1.08604,1.08293,1.1171,1.11196,1.11128,1.08393,1.1093,1.06052
85
+ Romania,2.75196,2.7643,2.88751,2.94744,2.87816,2.88838,2.96276,3.03483,2.99266,3.10535,2.81497,2.20882,2.05094,1.86926,1.86797,2.01514,2.05075,2.025,1.73667,1.59261,1.58611,1.71549,1.68369,1.63078,1.68934,1.71126,1.72153,1.70549,1.67689
86
+ Serbia,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,0.74051,0.7293,0.72854
87
+ Slovakia,--,--,--,--,--,--,--,--,--,--,--,--,--,0.77882,0.7458,0.80378,0.78591,0.77561,0.77297,0.76944,0.78496,0.82657,0.83829,0.81482,0.79884,0.82566,0.81973,0.78672,0.8022
88
+ Slovenia,--,--,--,--,--,--,--,--,--,--,--,--,0.2321,0.23123,0.24741,0.27805,0.30341,0.29136,0.29125,0.29419,0.29279,0.29891,0.30199,0.30092,0.31411,0.31782,0.31755,0.31422,0.3273
89
+ Spain,3.04408,3.09005,3.33173,3.41925,3.25423,3.34068,3.39604,3.49713,3.74649,3.85932,3.92401,4.14791,4.11963,4.02125,4.18158,4.31423,4.4063,4.69594,4.92024,5.16441,5.53161,5.78662,5.86771,6.17845,6.39018,6.50542,6.55537,6.71796,6.50467
90
+ Sweden,2.0745,2.04197,1.88243,1.93752,2.03011,2.16753,2.19951,2.26714,2.23013,2.19853,2.21678,2.2125,2.24362,2.2431,2.25818,2.30821,2.27204,2.31614,2.4012,2.36636,2.26833,2.40259,2.26938,2.16687,2.30479,2.32808,2.20883,2.24258,2.21851
91
+ Switzerland,1.13892,1.05757,1.03453,1.08637,1.06187,1.15562,1.16531,1.16833,1.18782,1.15243,1.17833,1.21987,1.23144,1.22232,1.24492,1.23882,1.21405,1.23226,1.26074,1.3239,1.29445,1.34652,1.28055,1.30204,1.29171,1.26224,1.28482,1.28341,1.31872
92
+ Turkey,1.04087,0.97646,1.12445,1.16247,1.22602,1.33409,1.49857,1.65647,1.70511,1.80389,1.97388,2.06514,2.12799,2.32834,2.23045,2.49064,2.74863,2.92682,2.99525,2.90706,3.1634,2.89407,3.14689,3.31813,3.51284,3.73447,4.07229,4.39771,4.30511
93
+ United Kingdom,8.84074,8.51623,8.37158,8.40572,8.45009,8.75141,8.91804,9.06619,9.06493,9.30426,9.2902,9.53644,9.28628,9.58439,9.55707,9.45224,10.06658,9.767,9.75255,9.80298,9.738,9.87406,9.74418,9.85783,9.92463,9.92618,9.80179,9.44116,9.34847
94
+ Armenia,--,--,--,--,--,--,--,--,--,--,--,--,0.19984,0.14554,0.13423,0.13419,0.16968,0.14562,0.15267,0.15564,0.16247,0.1646,0.16393,0.17541,0.18063,0.20158,0.20379,0.22112,0.2158
95
+ Azerbaijan,--,--,--,--,--,--,--,--,--,--,--,--,0.9918,0.76598,0.76195,0.73143,0.64552,0.63778,0.5443,0.56342,0.52002,0.52053,0.59178,0.60157,0.63523,0.65709,0.69678,0.5908,0.67881
96
+ Belarus,--,--,--,--,--,--,--,--,--,--,--,--,1.52941,1.24347,1.07594,1.00994,1.00954,0.99603,0.97723,0.98777,1.05214,0.96268,0.90747,0.98457,0.95119,1.12402,1.15429,1.18792,1.15907
97
+ Estonia,--,--,--,--,--,--,--,--,--,--,--,--,0.29165,0.18966,0.18979,0.1756,0.22544,0.21632,0.2312,0.19224,0.1963,0.20389,0.20339,0.22365,0.23264,0.23214,0.23107,0.24743,0.24405
98
+ Former U.S.S.R.,46.73513,47.22093,49.26201,50.41837,53.41549,55.68861,57.47549,58.82369,60.75979,60.06943,60.97557,57.60268,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--
99
+ Georgia,--,--,--,--,--,--,--,--,--,--,--,--,0.32759,0.19109,0.1548,0.15086,0.15873,0.16348,0.16531,0.14406,0.13752,0.12619,0.14756,0.13234,0.13504,0.15002,0.13792,0.16431,0.16743
100
+ Kazakhstan,--,--,--,--,--,--,--,--,--,--,--,--,3.42894,2.85513,2.29445,1.90435,1.96301,1.68726,1.62533,1.79159,1.93239,2.00755,2.06518,1.91983,2.18233,2.20895,2.39445,2.31985,2.16926
101
+ Kyrgyzstan,--,--,--,--,--,--,--,--,--,--,--,--,0.29244,0.24353,0.2343,0.19044,0.22943,0.21813,0.21854,0.23592,0.24136,0.22777,0.19289,0.20385,0.21189,0.21021,0.21543,0.20798,0.18374
102
+ Latvia,--,--,--,--,--,--,--,--,--,--,--,--,0.22314,0.16423,0.16171,0.17263,0.17215,0.16174,0.16027,0.14799,0.15412,0.16092,0.15399,0.16068,0.17569,0.18532,0.18437,0.18628,0.16289
103
+ Lithuania,--,--,--,--,--,--,--,--,--,--,--,--,0.47702,0.37634,0.35493,0.37862,0.36093,0.35896,0.39095,0.30442,0.2973,0.31679,0.34054,0.35264,0.35316,0.35257,0.35275,0.38578,0.3934
104
+ Moldova,--,--,--,--,--,--,--,--,--,--,--,--,0.28316,0.20184,0.15647,0.1392,0.15137,0.15359,0.13853,0.11022,0.11014,0.10728,0.11896,0.1305,0.12268,0.1338,0.14305,0.13297,0.13797
105
+ Russia,--,--,--,--,--,--,--,--,--,--,--,--,34.11568,30.58388,29.22517,27.94068,27.35318,25.53854,25.72275,26.77771,27.21899,27.22593,27.67507,28.51231,29.36966,29.52035,28.81788,29.96851,30.42593
106
+ Tajikistan,--,--,--,--,--,--,--,--,--,--,--,--,0.28994,0.25421,0.25274,0.20849,0.22971,0.2189,0.2264,0.24176,0.23909,0.24705,0.25201,0.27054,0.27419,0.28561,0.28146,0.27971,0.25539
107
+ Turkmenistan,--,--,--,--,--,--,--,--,--,--,--,--,0.31126,0.27038,0.28682,0.30405,0.29793,0.30586,0.28061,0.31785,0.40112,0.50227,0.58452,0.75923,0.80707,0.85443,0.8638,0.92401,0.99517
108
+ Ukraine,--,--,--,--,--,--,--,--,--,--,--,--,8.57337,8.08747,7.00352,6.91332,6.33645,6.06835,5.85077,5.75359,5.75077,5.64105,5.82162,6.28253,6.25427,6.37205,5.906,6.33949,6.30195
109
+ Uzbekistan,--,--,--,--,--,--,--,--,--,--,--,--,1.66187,2.03098,1.74539,1.8688,1.8794,1.87558,1.84477,1.86382,1.95472,2.04481,2.09616,2.12792,2.25401,2.1614,2.22683,2.22657,2.35342
110
+ Bahrain,0.13752,0.15787,0.16794,0.17792,0.17157,0.20492,0.22078,0.26522,0.22898,0.23439,0.25635,0.28713,0.24078,0.27663,0.28338,0.28363,0.28439,0.33517,0.35172,0.35646,0.36474,0.37722,0.39762,0.40773,0.41884,0.45747,0.49947,0.52436,0.54832
111
+ Iran,1.58261,1.48862,1.70731,2.09302,2.22534,2.39652,2.42887,2.54105,2.70365,2.98498,3.10319,3.23305,3.356,3.2392,3.68527,3.82476,3.96104,4.4335,4.58254,4.83492,5.0136,5.38754,5.88814,6.17977,6.39448,7.31781,7.66571,7.89668,8.12059
112
+ Iraq,0.52402,0.48294,0.4624,0.55081,0.53817,0.56653,0.62292,0.63925,0.76751,0.82522,0.91771,0.6001,0.83887,0.84464,1.10244,1.13058,1.12469,1.04127,1.05605,1.07373,1.08419,1.13411,1.14428,1.0122,1.12508,1.18546,1.16836,1.2565,1.35914
113
+ Israel,0.35096,0.35707,0.37468,0.36977,0.3814,0.35678,0.37165,0.39237,0.42507,0.44373,0.45182,0.47963,0.54028,0.53244,0.61975,0.62197,0.66144,0.71418,0.7261,0.73572,0.81129,0.87407,0.8409,0.85308,0.85549,0.87581,0.88357,0.87777,0.85957
114
+ Jordan,0.07704,0.09157,0.10455,0.11201,0.11582,0.12027,0.12935,0.14108,0.13173,0.13508,0.14553,0.1376,0.16057,0.14067,0.1836,0.1931,0.20535,0.19888,0.21528,0.21447,0.22545,0.22025,0.23061,0.25148,0.27821,0.29423,0.30837,0.30975,0.30511
115
+ Kuwait,0.48089,0.35214,0.35013,0.3885,0.4067,0.40268,0.45144,0.53896,0.61897,0.6963,0.44637,0.21583,0.3488,0.41377,0.57307,0.59178,0.74935,0.798,0.84566,0.86067,0.90963,0.88264,0.88761,0.96046,1.00698,1.15851,1.14497,1.13625,1.19296
116
+ Lebanon,0.10473,0.09745,0.09447,0.09773,0.09399,0.10834,0.10323,0.10697,0.09781,0.07744,0.07142,0.11807,0.11896,0.14042,0.17031,0.18276,0.19219,0.21977,0.22429,0.23013,0.23433,0.22499,0.22859,0.23803,0.22844,0.21854,0.19424,0.17922,0.20464
117
+ Oman,0.06467,0.06873,0.08358,0.09677,0.10035,0.11874,0.13477,0.13861,0.13042,0.16839,0.18358,0.20997,0.20445,0.22356,0.23685,0.22439,0.23107,0.26757,0.34683,0.30098,0.34089,0.34692,0.36024,0.3566,0.38096,0.48919,0.56151,0.59225,0.71283
118
+ Palestine,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,0.00957,0.01471,0.01499,0.01978,0.0266,0.02469,0.02643,0.04026,0.04934,0.05351,0.05453,0.05632
119
+ Qatar,0.2143,0.202,0.23742,0.22323,0.26846,0.24321,0.25573,0.26227,0.26799,0.27809,0.34252,0.39711,0.47494,0.53468,0.55856,0.5629,0.57852,0.61006,0.62262,0.5938,0.64476,0.5025,0.5271,0.58437,0.70528,0.84411,0.90625,0.94693,1.00217
120
+ Saudi Arabia,1.66331,2.02483,1.96743,2.12312,2.46675,2.71018,3.01461,3.07255,3.18356,3.12648,3.3474,3.49925,3.6636,2.90916,3.90046,3.82572,4.10441,4.3656,4.54323,4.60224,4.85276,5.1387,5.38353,5.76125,6.20771,6.59341,6.91564,6.25568,6.72754
121
+ Syria,0.27405,0.28914,0.29523,0.33399,0.36831,0.38492,0.38388,0.43466,0.45274,0.48254,0.56278,0.52102,0.53779,0.5452,0.63357,0.60911,0.65218,0.69498,0.7525,0.77364,0.78206,0.76222,0.83027,0.82867,0.84816,0.80629,0.81859,0.81826,0.83604
122
+ United Arab Emirates,0.26731,0.43622,0.41384,0.5109,0.58179,0.79708,0.90726,1.07115,1.17287,1.2686,1.22933,1.49165,1.61408,1.46204,1.49157,1.60656,1.66878,1.77107,1.83821,1.86471,1.8663,1.89112,2.05573,2.1047,2.21903,2.31365,2.53901,2.82421,3.25749
123
+ Yemen,0.09609,0.09778,0.11456,0.10413,0.13211,0.14669,0.14115,0.14022,0.14387,0.15439,0.16025,0.16598,0.17264,0.12871,0.13769,0.14988,0.15258,0.15864,0.17072,0.17888,0.19367,0.20573,0.22587,0.24444,0.2463,0.25679,0.28046,0.25545,0.31453
124
+ Algeria,0.80085,0.68005,0.9578,1.07399,1.15572,1.04784,1.0604,1.1349,1.20786,1.17025,1.2169,1.35505,1.29959,1.08345,1.23763,1.30333,1.26434,1.2026,1.25334,1.25165,1.23857,1.25615,1.27659,1.2927,1.26393,1.48134,1.54318,1.61954,1.70987
125
+ Angola,0.05816,0.05805,0.0618,0.06667,0.05992,0.07307,0.07392,0.07532,0.07828,0.07641,0.07983,0.08283,0.08553,0.08089,0.08235,0.0876,0.08436,0.09326,0.08492,0.09419,0.09094,0.1193,0.12741,0.13525,0.14463,0.14826,0.16655,0.19298,0.19944
126
+ Benin,0.00659,0.00662,0.00469,0.00686,0.00669,0.00787,0.00764,0.00598,0.00716,0.00768,0.00889,0.01017,0.01141,0.01244,0.01308,0.01428,0.01534,0.01668,0.01787,0.01954,0.02426,0.02449,0.02594,0.03053,0.03556,0.03725,0.04387,0.04777,0.04876
127
+ Botswana,0.01518,0.01542,0.01436,0.014,0.01442,0.01906,0.02021,0.02299,0.02467,0.0282,0.03297,0.0342,0.03907,0.0369,0.03956,0.04291,0.03967,0.04159,0.04732,0.04777,0.05757,0.0505,0.05087,0.04879,0.05531,0.05961,0.05976,0.06023,0.06202
128
+ Burkina Faso,0.00613,0.00617,0.00618,0.00621,0.00621,0.00591,0.00692,0.00722,0.00738,0.0066,0.00705,0.00812,0.00821,0.00866,0.01017,0.0104,0.01089,0.01705,0.01562,0.01608,0.01662,0.01662,0.01729,0.01803,0.01832,0.01877,0.01862,0.02082,0.02115
129
+ Burundi,0.00159,0.0018,0.00159,0.00202,0.00259,0.00277,0.00281,0.00319,0.00471,0.00505,0.00548,0.00606,0.00577,0.00427,0.00674,0.00658,0.00668,0.00676,0.00671,0.00661,0.00658,0.00712,0.00727,0.00729,0.00667,0.00668,0.00638,0.00615,0.00733
130
+ Cameroon,0.04713,0.05217,0.06048,0.06024,0.06116,0.06392,0.06991,0.06649,0.06631,0.07724,0.07769,0.07856,0.0788,0.05979,0.07455,0.07634,0.07601,0.08,0.08001,0.07822,0.08132,0.08165,0.07808,0.08387,0.08674,0.08577,0.09245,0.09829,0.09917
131
+ Cape Verde,0.00454,0.00453,0.002,0.00196,0.00239,0.00236,0.0008,0.00089,0.00128,0.00137,0.00146,0.0015,0.00159,0.00135,0.00172,0.00168,0.00177,0.00177,0.00177,0.00177,0.0031,0.00208,0.00222,0.00222,0.00427,0.00373,0.0042,0.00493,0.00464
132
+ Central African Republic,0.00274,0.00334,0.00358,0.00376,0.00363,0.00358,0.00427,0.0039,0.00412,0.00396,0.00424,0.00441,0.0045,0.00459,0.00484,0.00484,0.00489,0.005,0.00507,0.00507,0.00539,0.00549,0.00565,0.00567,0.00536,0.00531,0.00562,0.00626,0.00602
133
+ Chad,0.00407,0.00389,0.00389,0.00389,0.00186,0.00222,0.00399,0.00348,0.00232,0.00238,0.00493,0.00461,0.00464,0.00194,0.00248,0.00247,0.00255,0.00257,0.00257,0.00257,0.00278,0.00284,0.00293,0.00293,0.00272,0.00302,0.00325,0.00379,0.00371
134
+ Comoros,0.00063,0.00063,0.00063,0.00063,0.00064,0.00055,0.00055,0.00087,0.00091,0.00092,0.00118,0.00114,0.00114,0.0009,0.00118,0.00118,0.00118,0.00118,0.00123,0.00123,0.00136,0.00141,0.00146,0.00147,0.00151,0.00161,0.00163,0.00201,0.00167
135
+ Congo (Brazzaville),0.01194,0.01421,0.01282,0.01141,0.01205,0.01726,0.01512,0.01842,0.01503,0.01726,0.01927,0.01766,0.01681,0.01302,0.01455,0.01472,0.01546,0.01529,0.01435,0.01184,0.01302,0.016,0.0154,0.01722,0.01848,0.02494,0.0286,0.03007,0.03791
136
+ Congo (Kinshasa),0.09072,0.09277,0.09408,0.09741,0.09554,0.09769,0.10398,0.09915,0.10981,0.11239,0.10628,0.10518,0.11521,0.1074,0.09838,0.10828,0.10937,0.09877,0.09347,0.09292,0.09171,0.08267,0.07982,0.08113,0.09578,0.09893,0.1006,0.10677,0.10507
137
+ Cote dIvoire (IvoryCoast),0.07388,0.08135,0.07638,0.07388,0.06544,0.07711,0.07858,0.08658,0.0905,0.09075,0.07791,0.06585,0.06377,0.06313,0.07474,0.08127,0.10143,0.09546,0.09637,0.12522,0.13277,0.10998,0.10706,0.10982,0.11503,0.1133,0.11395,0.11951,0.12491
138
+ Djibouti,0.02205,0.0177,0.01779,0.01314,0.01096,0.01082,0.00974,0.00996,0.00973,0.02304,0.02326,0.02353,0.02359,0.02266,0.02427,0.02416,0.02416,0.0245,0.0245,0.0245,0.02465,0.02502,0.02506,0.02559,0.0259,0.02565,0.02374,0.02319,0.024
139
+ Egypt,0.70639,0.82834,0.92715,1.05147,1.15066,1.21268,1.24476,1.29745,1.30184,1.34836,1.43795,1.43262,1.42707,1.37147,1.55625,1.58766,1.72696,1.78956,1.84906,1.92279,2.00513,2.22519,2.25766,2.4329,2.58311,2.72194,2.56473,2.73907,3.16914
140
+ Equatorial Guinea,0.00085,0.00084,0.00106,0.00106,0.00106,0.0012,0.00121,0.00116,0.00116,0.00168,0.00173,0.00182,0.00172,0.00181,0.00186,0.00185,0.0019,0.00204,0.00278,0.00278,0.00433,0.00354,0.04942,0.05064,0.0059,0.05036,0.05045,0.05876,0.05986
141
+ Eritrea,--,--,--,--,--,--,--,--,--,--,--,--,--,--,0.01373,0.0152,0.01553,0.01573,0.01684,0.01421,0.00887,0.01051,0.00976,0.01102,0.01037,0.01036,0.01035,0.00973,0.01011
142
+ Ethiopia,0.03009,0.03056,0.03403,0.03878,0.03855,0.04553,0.04451,0.05018,0.04922,0.05208,0.05321,0.04599,0.06159,0.05553,0.044,0.04756,0.03972,0.04016,0.05236,0.06132,0.06457,0.06958,0.0745,0.08134,0.08518,0.09097,0.10302,0.11177,0.12093
143
+ Gabon,0.02842,0.03203,0.03022,0.04146,0.03733,0.03172,0.02869,0.03333,0.0353,0.04399,0.04332,0.0443,0.04559,0.04055,0.04428,0.04181,0.04341,0.04574,0.04426,0.03995,0.03684,0.0382,0.03796,0.03898,0.0393,0.03841,0.04235,0.04352,0.04765
144
+ "Gambia, The",0.00224,0.00223,0.00223,0.00223,0.00246,0.00242,0.00225,0.0026,0.00269,0.00265,0.00271,0.00282,0.00282,0.00299,0.00331,0.00309,0.00308,0.00309,0.00327,0.00327,0.00365,0.00392,0.00401,0.00406,0.00408,0.00423,0.00453,0.00559,0.00525
145
+ Ghana,0.08608,0.08299,0.08261,0.05537,0.05144,0.05842,0.07788,0.08511,0.09327,0.10297,0.10037,0.10433,0.11333,0.10665,0.115,0.11703,0.12352,0.12183,0.09528,0.11604,0.14286,0.1419,0.13071,0.12545,0.14495,0.14937,0.15015,0.13327,0.16444
146
+ Guinea,0.01374,0.0135,0.01372,0.01373,0.01406,0.01239,0.016,0.01676,0.01713,0.01665,0.02186,0.01738,0.01777,0.01674,0.0187,0.01865,0.01884,0.01978,0.0201,0.02096,0.02176,0.02345,0.02392,0.02207,0.02363,0.02358,0.02306,0.02344,0.02297
147
+ Guinea-Bissau,0.00123,0.00123,0.00125,0.00125,0.00168,0.00181,0.00142,0.00262,0.00293,0.00307,0.00388,0.00397,0.004,0.00343,0.00437,0.00432,0.00436,0.00437,0.00437,0.00437,0.00485,0.0049,0.00508,0.00521,0.00518,0.00538,0.00533,0.00551,0.00629
148
+ Kenya,0.09913,0.10233,0.10196,0.10309,0.10148,0.10662,0.11327,0.10436,0.1165,0.12534,0.12755,0.1177,0.12609,0.12429,0.13586,0.1424,0.14803,0.13853,0.15282,0.146,0.14535,0.14765,0.15302,0.16879,0.17914,0.19383,0.21236,0.21337,0.20818
149
+ Lesotho,0.00212,0.00192,0.00212,0.00212,0.00212,0.00219,0.0022,0.0022,0.0015,0.0022,0.00285,0.0029,0.00306,0.00311,0.00352,0.00357,0.0036,0.00355,0.0032,0.00467,0.00588,0.00598,0.00615,0.00635,0.00595,0.00662,0.00531,0.00566,0.0057
150
+ Liberia,0.03184,0.02937,0.02955,0.02942,0.02581,0.0262,0.02118,0.01655,0.02054,0.01685,0.00814,0.00476,0.00483,0.0049,0.00533,0.00533,0.00553,0.00559,0.00577,0.00577,0.00616,0.00652,0.00705,0.00727,0.00735,0.00745,0.00858,0.00942,0.00957
151
+ Libya,0.39743,0.3575,0.3539,0.38078,0.38419,0.42109,0.44198,0.45225,0.46429,0.48088,0.51011,0.53234,0.49646,0.44235,0.53086,0.55334,0.58466,0.61762,0.59319,0.55764,0.62988,0.66709,0.69699,0.68428,0.75794,0.77757,0.73594,0.76331,0.78391
152
+ Madagascar,0.01891,0.01648,0.0152,0.01936,0.01928,0.02096,0.01523,0.02076,0.02275,0.01724,0.01698,0.01744,0.01853,0.01785,0.02097,0.02178,0.02227,0.02273,0.02332,0.02339,0.03093,0.03335,0.03755,0.03941,0.04278,0.0415,0.04059,0.04007,0.04622
153
+ Malawi,0.01192,0.01244,0.01174,0.01072,0.01064,0.01132,0.01148,0.01196,0.01165,0.01306,0.0149,0.01725,0.01744,0.0165,0.01847,0.01906,0.01936,0.01949,0.02088,0.02213,0.02334,0.02387,0.02445,0.02447,0.02725,0.02886,0.02896,0.0311,0.03157
154
+ Mali,0.00704,0.00907,0.00726,0.00741,0.00754,0.00814,0.00675,0.00767,0.00482,0.00835,0.00844,0.00868,0.00904,0.0093,0.00953,0.00956,0.00958,0.00988,0.01,0.01001,0.01023,0.01029,0.01102,0.0111,0.01144,0.0125,0.01163,0.01188,0.01234
155
+ Mauritania,0.0092,0.00898,0.00909,0.00904,0.01316,0.01301,0.00741,0.01022,0.01311,0.01524,0.01356,0.0143,0.04602,0.03934,0.04727,0.04792,0.04817,0.04856,0.04874,0.04874,0.04976,0.04976,0.04748,0.04879,0.04151,0.04908,0.04206,0.03878,0.03944
156
+ Mauritius,0.01366,0.01206,0.012,0.01287,0.01342,0.01444,0.01754,0.0155,0.0212,0.0251,0.02774,0.02774,0.03286,0.03086,0.03249,0.03554,0.03538,0.03581,0.03691,0.03782,0.04918,0.05512,0.04993,0.0516,0.05425,0.05645,0.05963,0.06136,0.06211
157
+ Morocco,0.22621,0.21636,0.2182,0.22408,0.20998,0.22413,0.25189,0.25296,0.26609,0.29726,0.30899,0.31944,0.32663,0.30248,0.39049,0.37388,0.39885,0.40594,0.41548,0.43711,0.44698,0.4812,0.48811,0.49113,0.4922,0.49762,0.51642,0.52831,0.55902
158
+ Mozambique,0.17546,0.06689,0.06445,0.08622,0.03419,0.03311,0.01812,0.01736,0.02463,0.02016,0.02036,0.02085,0.02042,0.02184,0.02133,0.02241,0.02159,0.02587,0.03217,0.07782,0.10085,0.13068,0.13324,0.13221,0.14246,0.15817,0.17736,0.17863,0.16795
159
+ Namibia,--,--,--,--,--,--,--,--,--,--,0.03435,0.01809,0.01694,0.01796,0.0203,0.03191,0.03087,0.03002,0.03332,0.03856,0.0415,0.04742,0.0503,0.05393,0.0569,0.05861,0.0626,0.06488,0.07451
160
+ Niger,0.00915,0.00951,0.00999,0.01031,0.01085,0.01088,0.00918,0.01015,0.01359,0.01419,0.01457,0.01466,0.01486,0.015,0.0154,0.01536,0.01526,0.01508,0.01515,0.01495,0.01511,0.01549,0.01643,0.01689,0.01738,0.0171,0.01708,0.01728,0.01797
161
+ Nigeria,0.42228,0.51801,0.51696,0.51838,0.55649,0.59952,0.58736,0.61963,0.66323,0.71807,0.69886,0.7694,0.78635,0.74862,0.7432,0.83268,0.8494,0.85069,0.81581,0.81752,0.80941,0.91104,0.93475,0.97853,0.98351,1.09125,1.03987,0.99648,1.08778
162
+ Reunion,0.01195,0.01261,0.01375,0.01546,0.01624,0.01672,0.01671,0.01822,0.01952,0.02169,0.02318,0.02508,0.02604,0.02653,0.03262,0.03241,0.03247,0.03301,0.04067,0.0407,0.04209,0.04386,0.04384,0.04391,0.04435,0.04518,0.04571,0.04686,0.0472
163
+ Rwanda,0.00354,0.00645,0.00646,0.00729,0.01097,0.01128,0.01098,0.0113,0.01132,0.01174,0.01199,0.01214,0.01245,0.00873,0.01151,0.01169,0.01151,0.01186,0.01221,0.01184,0.01234,0.01233,0.01248,0.01278,0.01204,0.01242,0.0124,0.01099,0.01072
164
+ Saint Helena,0,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00009,0.00009,0.00009,0.00009,0.00004,0.00004,0.00009,0.00009,0.00009,0.00009,0.00009,0.00009,0.00009,0.00031,0.00018,0.00018,0.00018,0.00013,0.00018,0.00016,0.00018,0.00019
165
+ Sao Tome and Principe,0.00054,0.00054,0.00055,0.00053,0.00055,0.00057,0.00056,0.00057,0.00057,0.00057,0.00105,0.0011,0.00114,0.00109,0.00119,0.00119,0.00118,0.00119,0.00118,0.0012,0.00138,0.00132,0.00139,0.0014,0.00138,0.00141,0.00158,0.00194,0.00196
166
+ Senegal,0.03738,0.03627,0.03707,0.03543,0.04209,0.0413,0.04079,0.04109,0.03516,0.03659,0.0362,0.03351,0.04077,0.0346,0.05134,0.05529,0.05549,0.05101,0.05425,0.05971,0.06364,0.06361,0.06653,0.06847,0.07827,0.08369,0.08578,0.08727,0.08818
167
+ Seychelles,0.00316,0.00253,0.00234,0.00405,0.00426,0.00437,0.00438,0.00467,0.00647,0.00686,0.0063,0.00678,0.00697,0.0071,0.00725,0.00729,0.00727,0.00782,0.00782,0.00782,0.0081,0.00835,0.01215,0.01185,0.01228,0.01209,0.016,0.01338,0.01402
168
+ Sierra Leone,0.01057,0.01063,0.01141,0.01076,0.01071,0.01167,0.01259,0.01352,0.01472,0.01469,0.01482,0.01553,0.01135,0.00935,0.01052,0.01216,0.01213,0.01243,0.01247,0.01247,0.01335,0.01366,0.01389,0.01421,0.01682,0.01674,0.01673,0.01786,0.01807
169
+ Somalia,0.01656,0.01929,0.01893,0.0185,0.0192,0.01888,0.02008,0.0149,0.01508,0.01535,0.01402,0.00835,0.00776,0.00767,0.00803,0.00803,0.00803,0.00803,0.00803,0.00803,0.00998,0.00998,0.00998,0.01009,0.01007,0.01021,0.01071,0.01209,0.01217
170
+ South Africa,2.72828,2.95592,3.15803,3.18719,3.4528,3.51604,3.61766,3.66845,3.78098,3.55047,3.52342,3.67624,3.76193,3.67461,4.08411,4.10982,4.16523,4.55685,4.34917,4.46314,4.58358,4.64693,4.53562,4.87588,5.21486,5.12231,5.29131,5.52167,5.71413
171
+ Sudan,0.05224,0.05595,0.06067,0.05867,0.05436,0.06154,0.06886,0.06705,0.07187,0.06886,0.06361,0.08789,0.08185,0.07011,0.07032,0.06599,0.06661,0.06814,0.06845,0.07434,0.10275,0.1303,0.13473,0.14868,0.15979,0.17172,0.1916,0.18674,0.18862
172
+ Swaziland,0.01009,0.00962,0.00926,0.00736,0.00863,0.01076,0.01038,0.01143,0.01206,0.01258,0.01225,0.01219,0.0122,0.01112,0.01459,0.01567,0.01456,0.01507,0.01635,0.01804,0.01842,0.01833,0.02358,0.02057,0.02081,0.01656,0.01763,0.01972,0.01947
173
+ Tanzania,0.03903,0.04366,0.04296,0.03983,0.04243,0.04312,0.04934,0.04561,0.04835,0.04975,0.0545,0.04977,0.05194,0.05324,0.04931,0.04887,0.05138,0.04795,0.05498,0.0582,0.0582,0.06861,0.07525,0.07626,0.08168,0.09101,0.09389,0.11033,0.11586
174
+ Togo,0.00961,0.00903,0.00899,0.00932,0.01099,0.01074,0.00911,0.00872,0.00909,0.01039,0.01032,0.01682,0.01229,0.01038,0.01126,0.01229,0.01183,0.01119,0.01226,0.01739,0.02191,0.01588,0.02058,0.03206,0.03397,0.03354,0.03483,0.03759,0.04064
175
+ Tunisia,0.12811,0.14107,0.13426,0.1532,0.16706,0.17057,0.18062,0.16845,0.17914,0.20375,0.20195,0.1976,0.19069,0.19936,0.2375,0.21225,0.23096,0.26778,0.28711,0.28948,0.30097,0.33624,0.33846,0.33076,0.33363,0.35825,0.33343,0.31924,0.34927
176
+ Uganda,0.01594,0.01135,0.01296,0.01232,0.01351,0.01423,0.01522,0.01369,0.01772,0.01779,0.01941,0.0209,0.02324,0.02214,0.02433,0.02472,0.02541,0.02708,0.02918,0.02925,0.03282,0.03501,0.0365,0.03925,0.04059,0.04158,0.03806,0.04245,0.04367
177
+ Western Sahara,0.00236,0.00235,0.00264,0.00256,0.00265,0.0027,0.00271,0.00279,0.00283,0.00283,0.00296,0.00296,0.003,0.00281,0.00292,0.00313,0.00313,0.00313,0.00313,0.00313,0.0036,0.00366,0.00366,0.00366,0.00364,0.00412,0.00365,0.00383,0.00425
178
+ Zambia,0.13258,0.13411,0.13764,0.13438,0.13155,0.13022,0.12981,0.12025,0.12248,0.10338,0.1115,0.1076,0.11238,0.10341,0.1003,0.10138,0.09752,0.10684,0.10194,0.09909,0.09924,0.10487,0.10799,0.11254,0.11469,0.12143,0.12701,0.12573,0.12636
179
+ Zimbabwe,0.15517,0.15579,0.1451,0.16407,0.155,0.15409,0.18422,0.19702,0.20195,0.20237,0.21972,0.23169,0.22751,0.20708,0.20003,0.19887,0.20497,0.19993,0.19983,0.22761,0.21215,0.19942,0.19982,0.19783,0.17606,0.19416,0.17486,0.17092,0.16384
180
+ Afghanistan,0.02698,0.03036,0.03234,0.0387,0.03913,0.03872,0.03976,0.06343,0.11162,0.1103,0.10904,0.04788,0.03233,0.03116,0.03132,0.02652,0.02645,0.02533,0.02461,0.02484,0.02384,0.01556,0.01823,0.01629,0.01612,0.01779,0.0175,0.01734,0.01778
181
+ American Samoa,0.00593,0.00692,0.00962,0.00603,0.00695,0.00652,0.00673,0.00686,0.00676,0.00776,0.00807,0.00807,0.00827,0.00797,0.00803,0.0079,0.00801,0.00803,0.00803,0.00803,0.00784,0.00786,0.00799,0.00799,0.00795,0.00846,0.00861,0.00922,0.00934
182
+ Australia,2.74246,2.82434,2.89403,2.95862,3.23364,3.26488,3.24897,3.43487,3.41936,3.6185,3.71215,3.70818,3.81227,3.91532,3.92127,4.03594,4.21447,4.54991,4.58203,4.80232,4.83222,5.00307,5.0721,5.11394,5.28675,5.42012,5.4554,5.5697,5.7573
183
+ Bangladesh,0.12797,0.13932,0.15025,0.13998,0.16701,0.17329,0.18801,0.20723,0.22947,0.25175,0.25342,0.25726,0.28648,0.29877,0.33952,0.38176,0.38902,0.40315,0.41911,0.46537,0.50385,0.55255,0.58398,0.63485,0.67089,0.7089,0.76983,0.8025,0.87345
184
+ Bhutan,0.00015,0.00045,0.00058,0.00053,0.00048,0.00062,0.00278,0.00965,0.01213,0.01228,0.01303,0.01324,0.01349,0.01323,0.01482,0.01579,0.01751,0.01757,0.01704,0.0172,0.01725,0.01889,0.02098,0.02312,0.02144,0.02348,0.03665,0.05119,0.0549
185
+ Brunei,0.08202,0.08518,0.09301,0.07288,0.06434,0.07673,0.05094,0.08183,0.07133,0.08277,0.07026,0.03869,0.05491,0.04865,0.05032,0.06192,0.05773,0.06159,0.05578,0.06268,0.0649,0.07311,0.08476,0.09008,0.10042,0.11553,0.17646,0.18178,0.18611
186
+ Burma (Myanmar),0.0695,0.07165,0.07937,0.09098,0.09891,0.10365,0.08891,0.08835,0.08415,0.08858,0.08565,0.08442,0.08816,0.09019,0.1107,0.11753,0.11905,0.12728,0.13868,0.14005,0.15604,0.15259,0.17845,0.19455,0.21095,0.27765,0.25538,0.27077,0.26486
187
+ Cambodia,0.00455,0.0048,0.00534,0.00562,0.00614,0.00626,0.00653,0.00663,0.00691,0.00694,0.00702,0.00722,0.00744,0.00744,0.00763,0.02116,0.02339,0.02741,0.03201,0.03263,0.0341,0.03979,0.04278,0.04662,0.05206,0.05531,0.06086,0.06576,0.06603
188
+ China,17.28743,17.19205,17.93384,19.00967,20.45343,22.00581,23.23741,24.75911,26.4463,26.95795,26.9986,28.1579,29.26608,30.03294,34.11046,34.7564,35.55399,37.74732,37.03964,36.51251,36.35203,38.41214,43.90988,51.15543,62.91903,68.24567,72.8906,78.00135,85.05974
189
+ Cook Islands,0.00042,0.00084,0.00082,0.00083,0.00083,0.00083,0.00076,0.00076,0.00076,0.00067,0.00067,0.00056,0.00067,0.00067,0.00067,0.00067,0.00067,0.00067,0.00067,0.00067,0.0008,0.0008,0.0008,0.0008,0.00089,0.00098,0.00103,0.00096,0.00124
190
+ Fiji,0.01529,0.01577,0.01546,0.0132,0.01451,0.01463,0.01745,0.01453,0.01477,0.01697,0.01874,0.01599,0.01639,0.01556,0.01799,0.01918,0.01975,0.01967,0.01993,0.0221,0.02547,0.02721,0.03178,0.03956,0.04273,0.04231,0.04413,0.04251,0.03994
191
+ French Polynesia,0.00312,0.00461,0.00624,0.00842,0.01271,0.01117,0.01396,0.01424,0.01435,0.01439,0.01375,0.01363,0.01333,0.01245,0.01081,0.01142,0.01148,0.01149,0.01167,0.01102,0.01072,0.01065,0.01126,0.01327,0.01339,0.01431,0.01559,0.01554,0.01537
192
+ Guam,0.05329,0.0745,0.05799,0.05546,0.01909,0.0094,0.01564,0.01085,0.01126,0.01071,0.02594,0.02942,0.0351,0.04637,0.06643,0.05038,0.04479,0.05113,0.0422,0.047,0.03928,0.04231,0.02882,0.0331,0.0263,0.02938,0.03058,0.02752,0.02381
193
+ Hawaiian Trade Zone,0.09468,0.10902,0.10042,0.09487,0.11496,0.1103,0.06534,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--
194
+ Hong Kong,0.2724,0.28356,0.31099,0.34283,0.35351,0.37015,0.39209,0.44013,0.49405,0.51427,0.50653,0.49495,0.55623,0.56629,0.59318,0.62864,0.68003,0.69036,0.72987,0.86455,0.80565,0.85755,0.92558,0.95826,1.06668,1.11507,1.10248,1.13666,1.07983
195
+ India,4.04087,4.62703,4.73881,4.99261,5.65399,5.91415,6.35848,6.44899,7.04691,7.46151,7.87914,8.37385,8.85032,8.74128,9.95524,11.44262,11.04174,11.63701,12.16625,12.98828,13.4619,13.93706,13.75309,14.22798,15.38307,16.36261,17.66375,18.84763,19.95423
196
+ Indonesia,1.16582,1.27211,1.30655,1.38716,1.46319,1.53927,1.65944,1.73052,1.85779,2.10278,2.31959,2.54464,2.64862,2.78552,3.11637,3.26334,3.55371,3.65505,3.55545,3.91331,3.92117,3.96036,4.18007,4.25094,4.43065,4.71101,5.21636,5.63498,5.82233
197
+ Japan,15.20992,15.13041,14.58474,14.30772,16.30672,16.22482,15.71465,16.75161,17.9545,18.53826,19.57318,20.12051,20.14375,20.16066,21.1479,21.62347,21.98607,22.41235,21.89014,22.37176,22.7982,22.45539,22.35506,22.4407,23.03985,22.93593,23.16837,22.93142,22.29731
198
+ Kiribati,0.00034,0.0004,0.0004,0.0004,0.00029,0.00029,0.00026,0.00031,0.00031,0.00031,0.00031,0.00037,0.00031,0.00031,0.00031,0.00031,0.00031,0.00031,0.00031,0.00031,0.00035,0.00035,0.00045,0.00045,0.00045,0.00054,0.00054,0.00057,0.00061
199
+ "Korea, North",1.32754,1.37409,1.43933,1.50349,1.54723,1.62406,1.61938,1.56274,1.9215,1.57464,1.53212,1.49528,1.31677,1.21589,1.14549,1.06627,0.91771,0.83831,0.75979,0.82353,0.85941,0.88168,0.85064,0.87877,0.89887,0.93287,0.93706,0.80374,0.88497
200
+ "Korea, South",1.75836,1.82226,1.83276,2.01014,2.13481,2.30592,2.5749,2.81632,3.12305,3.39632,3.8413,4.3433,4.83041,5.39183,5.83617,6.3617,6.74547,7.33051,6.90581,7.47454,7.83936,8.09976,8.4012,8.65312,8.91069,9.22774,9.34094,9.70718,9.88633
201
+ Laos,0.01311,0.01129,0.01159,0.01078,0.00965,0.00939,0.00969,0.0077,0.00724,0.00908,0.01017,0.01069,0.01087,0.01009,0.01107,0.01307,0.01686,0.01887,0.02302,0.02674,0.03306,0.03529,0.03448,0.03276,0.03447,0.03655,0.03739,0.03887,0.04248
202
+ Macau,0.00698,0.00655,0.00699,0.00985,0.01087,0.00893,0.01241,0.01384,0.01374,0.01474,0.01513,0.0152,0.0157,0.01616,0.01852,0.01879,0.0209,0.0214,0.02302,0.02444,0.02211,0.02369,0.02586,0.02686,0.03248,0.02857,0.03522,0.03774,0.04118
203
+ Malaysia,0.41839,0.43884,0.45554,0.51398,0.61396,0.69926,0.74984,0.75377,0.79964,0.86664,0.97969,1.0869,1.13703,1.16581,1.42724,1.4696,1.64099,1.67018,1.68849,1.74301,1.97671,2.09383,2.17532,2.26786,2.26065,2.28944,2.36515,2.32461,2.45249
204
+ Maldives,0.00021,0.00021,0.00021,0.00021,0.00083,0.0009,0.00114,0.00114,0.00123,0.00123,0.00136,0.00136,0.00141,0.00171,0.00342,0.00483,0.0049,0.00433,0.00468,0.00468,0.00663,0.00713,0.01307,0.0147,0.01027,0.00823,0.01136,0.01279,0.01218
205
+ Mongolia,0.08316,0.07573,0.09037,0.09304,0.0942,0.10401,0.11106,0.11697,0.12118,0.11557,0.10901,0.12917,0.11171,0.10039,0.0948,0.10003,0.07572,0.06211,0.06221,0.06154,0.06313,0.06517,0.06955,0.06625,0.07023,0.07356,0.08595,0.0877,0.08869
206
+ Nauru,0.0019,0.00192,0.00192,0.00192,0.00198,0.00197,0.00197,0.00197,0.00196,0.00197,0.00205,0.00205,0.00209,0.00209,0.0021,0.00214,0.00213,0.00214,0.00214,0.00214,0.00213,0.00214,0.00223,0.00223,0.00226,0.00231,0.00226,0.0023,0.00242
207
+ Nepal,0.00827,0.0076,0.00974,0.01093,0.01271,0.01102,0.01392,0.0165,0.01656,0.01667,0.01795,0.02188,0.02353,0.02274,0.02706,0.03035,0.03421,0.03694,0.04958,0.05684,0.05805,0.06212,0.0586,0.06154,0.06292,0.07002,0.07072,0.0736,0.07608
208
+ New Caledonia,0.02755,0.02651,0.02087,0.01782,0.02156,0.02264,0.02233,0.02183,0.02386,0.02615,0.02489,0.02548,0.02623,0.02572,0.02599,0.02644,0.02726,0.02531,0.02594,0.02647,0.02967,0.02913,0.03219,0.03319,0.03537,0.03493,0.0404,0.04224,0.0429
209
+ New Zealand,0.51056,0.50508,0.51546,0.54088,0.57656,0.5873,0.63597,0.64093,0.6876,0.69361,0.72851,0.73255,0.73883,0.74814,0.78855,0.80174,0.80557,0.81469,0.79086,0.8288,0.84839,0.85559,0.88671,0.86982,0.89464,0.87592,0.88209,0.88185,0.88213
210
+ Niue,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00004,0.00006,0.00007,0.00007,0.00007
211
+ Pakistan,0.63141,0.68508,0.78194,0.79211,0.81937,0.87242,0.93272,1.00649,1.07839,1.13443,1.17658,1.24869,1.30998,1.35773,1.5331,1.58131,1.66887,1.69189,1.73805,1.81396,1.8557,1.80958,1.82418,1.92133,1.98889,2.16307,2.3983,2.4963,2.48147
212
+ Papua New Guinea,0.02903,0.02892,0.02886,0.02972,0.0335,0.03514,0.03586,0.03907,0.0368,0.03777,0.03829,0.03802,0.03996,0.04005,0.03886,0.04525,0.04704,0.04448,0.04474,0.04526,0.04557,0.04578,0.06074,0.0688,0.06803,0.06662,0.06947,0.06927,0.07264
213
+ Philippines,0.57538,0.56583,0.57883,0.56552,0.54965,0.5367,0.5392,0.59789,0.64003,0.71321,0.73076,0.73139,0.77224,0.79388,0.90317,0.96322,1.02296,1.08665,1.12926,1.21508,1.2531,1.22579,1.24965,1.27618,1.31552,1.31367,1.31008,1.30024,1.293
214
+ Samoa,0.00145,0.00154,0.00171,0.00171,0.00222,0.00181,0.00184,0.00182,0.00182,0.00193,0.00202,0.00202,0.00211,0.00211,0.00202,0.00217,0.0022,0.00224,0.00229,0.00234,0.00234,0.00248,0.0027,0.00263,0.00265,0.00279,0.00275,0.0028,0.00292
215
+ Singapore,0.44171,0.46278,0.49037,0.48736,0.51378,0.49804,0.57213,0.63386,0.67652,0.7329,0.80261,0.85451,0.96949,0.96169,1.16758,1.1852,1.35168,1.45078,1.49949,1.48526,1.52164,1.61104,1.5925,1.68206,1.89334,2.03386,2.08017,2.22419,2.37597
216
+ Solomon Islands,0.00147,0.00208,0.00189,0.00209,0.0021,0.00183,0.00184,0.00212,0.00233,0.00242,0.00247,0.00247,0.00242,0.00223,0.00234,0.00242,0.00242,0.00242,0.00242,0.00242,0.0025,0.00251,0.0026,0.0026,0.00267,0.00294,0.00273,0.00303,0.00327
217
+ Sri Lanka,0.0883,0.08934,0.09251,0.09056,0.10712,0.09586,0.09848,0.10326,0.09914,0.09549,0.10563,0.10529,0.10714,0.11889,0.13631,0.14655,0.14603,0.16136,0.16774,0.17986,0.18929,0.18637,0.18861,0.20064,0.19912,0.21938,0.21632,0.22221,0.2153
218
+ Taiwan,1.11685,1.07033,1.0703,1.22045,1.41214,1.45643,1.55603,1.66344,1.79761,1.91653,2.02369,2.07695,2.18823,2.11548,2.57347,2.82712,3.02418,3.17368,3.36497,3.54479,3.8074,3.85485,4.08254,4.25666,4.4001,4.43559,4.56666,4.61249,4.5604
219
+ Thailand,0.50786,0.54449,0.53202,0.56767,0.6305,0.70186,0.7224,0.79284,0.90767,1.07364,1.25449,1.37083,1.4671,1.57659,1.8698,2.11625,2.44144,2.59714,2.44083,2.50308,2.58148,2.7009,2.94377,3.22211,3.45517,3.66706,3.72069,3.86424,3.95827
220
+ Timor-Leste (East Timor),--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,0.0023,0.0025,0.00249,0.00254,0.00462,0.00482
221
+ Tonga,0.00043,0.00064,0.00059,0.00064,0.00064,0.00066,0.00066,0.00097,0.00115,0.00125,0.00125,0.00142,0.00141,0.00141,0.00165,0.00165,0.00183,0.00188,0.00183,0.00183,0.00187,0.00178,0.00159,0.00159,0.00171,0.00208,0.00246,0.00252,0.00272
222
+ U.S. Pacific Islands,0.00219,0.00218,0.00218,0.00218,0.00206,0.00202,0.00217,0.00217,0.00286,0.00425,0.00438,0.00438,0.00441,0.00423,0.00434,0.00447,0.00454,0.00446,0.00446,0.00441,0.0044,0.00442,0.00434,0.00434,0.00431,0.00432,0.00442,0.0045,0.0043
223
+ Vanuatu,0.00172,0.0015,0.00151,0.00147,0.00154,0.00167,0.00167,0.0016,0.00189,0.00168,0.00177,0.00139,0.00092,0.00087,0.00092,0.00092,0.00092,0.00092,0.00092,0.00092,0.00118,0.00118,0.00127,0.00127,0.00131,0.0014,0.00136,0.00158,0.00166
224
+ Vietnam,0.17136,0.16951,0.18354,0.18621,0.19248,0.21448,0.1915,0.22003,0.20047,0.24265,0.26463,0.28084,0.29175,0.33307,0.367,0.47714,0.56711,0.58366,0.61132,0.68331,0.73608,0.81314,0.90187,0.97817,1.12659,1.19901,1.29703,1.38852,1.60524
225
+ Wake Island,0.01857,0.01852,0.01852,0.01852,0.01874,0.01838,0.01843,0.01843,0.01824,0.01829,0.01784,0.01784,0.01806,0.01625,0.01823,0.01841,0.01845,0.01861,0.01861,0.01861,0.0187,0.01875,0.01907,0.01907,0.01896,0.01888,0.01937,0.01986,0.01945
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.1
2
+ Name: py_ssa_lib
3
+ Version: 0.0.1
4
+ Summary: "This package implements MSSA and SSA in Python"
5
+ Home-page: https://github.com/K-Ibadullaev/py_ssa
6
+ Author: [
7
+
8
+ { Konstantin Ibadullaev, email= <konstantin.ibadullaev.post@gmail.com>}]
9
+ License: GPL-3.0-or-later
10
+ Requires-Python: >=3.10.0
11
+ Description-Content-Type: text/markdown
12
+
13
+ # PY-SSA PACKAGE
14
+ This package contains python implementations of the **Singular Spectrum Analysis(SSA)** and **Multichannel Singular Spectrum Analysis(MSSA)**. One can use them for the time series analysis and forecasting.
15
+
16
+ ## Installation
17
+ ```shell
18
+ $ python -m pip install py_ssa
19
+ ```
@@ -0,0 +1,11 @@
1
+ py_ssa_lib/MSSA.py,sha256=5csSX5Qv8T8Xf4uj9EgUbjQPD51jk45L6NTmR5EEM9w,16624
2
+ py_ssa_lib/SSA.py,sha256=kjI4WlMbyYtzp6qi-WzOR6Czc88_evdsZVJqVXIbqp0,17495
3
+ py_ssa_lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ py_ssa_lib/datasets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ py_ssa_lib/datasets/energy_consumption_df.csv,sha256=PV31xOUPsdpBM1epZRE8A5vStVRQzWx9bhQGj9BWCXM,929
6
+ py_ssa_lib/datasets/load_energy_consumption_df.py,sha256=AKZl5SsKbGj9GTGMtEEq22OiUUQAuk4pt4WeCm4H1Kw,422
7
+ py_ssa_lib/datasets/total-primary-energy-consumption-csv-version-4.csv,sha256=jyTzt-uyk4eN8WFwf3lSJoGkRqF2De430eggZTsGMQA,51476
8
+ py_ssa_lib-0.0.1.dist-info/METADATA,sha256=vvqWX1uXnbba5AnZ9h00yZrSC5W7e4yEkTd7LdPGFeY,625
9
+ py_ssa_lib-0.0.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
10
+ py_ssa_lib-0.0.1.dist-info/top_level.txt,sha256=AZuvzjRa62YKe3oD75tH4UcX1hQ3PBcfzWcXJMuMVMg,11
11
+ py_ssa_lib-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (72.1.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ py_ssa_lib