forked from burakbayramli/books
-
Notifications
You must be signed in to change notification settings - Fork 0
/
expense_stream_data.py
84 lines (80 loc) · 11.8 KB
/
expense_stream_data.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import numpy as np
m = 29
n = 36
P = np.matrix([
[0.166667, 0.111111, 0.083333, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.166667, 0.111111, 0.083333, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.166667, 0.111111, 0.083333, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.166667, 0.111111, 0.083333, 0.173437, 0.115439, 0.086163, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.166667, 0.111111, 0.083333, 0.173437, 0.115439, 0.086163, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.166667, 0.111111, 0.083333, 0.173437, 0.115439, 0.086163, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.166667, 0.111111, 0.083333, 0.173437, 0.115439, 0.086163, 0.187216, 0.125382, 0.095840, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.111111, 0.083333, 0.173437, 0.115439, 0.086163, 0.187216, 0.125382, 0.095840, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.111111, 0.083333, 0.173437, 0.115439, 0.086163, 0.187216, 0.125382, 0.095840, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.111111, 0.083333, 0.173437, 0.115439, 0.086163, 0.187216, 0.125382, 0.095840, 0.217975, 0.140170, 0.109240, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.083333, 0.000000, 0.115439, 0.086163, 0.187216, 0.125382, 0.095840, 0.217975, 0.140170, 0.109240, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.083333, 0.000000, 0.115439, 0.086163, 0.187216, 0.125382, 0.095840, 0.217975, 0.140170, 0.109240, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.083333, 0.000000, 0.115439, 0.086163, 0.187216, 0.125382, 0.095840, 0.217975, 0.140170, 0.109240, 0.253971, 0.167774, 0.126970, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.086163, 0.000000, 0.125382, 0.095840, 0.217975, 0.140170, 0.109240, 0.253971, 0.167774, 0.126970, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.086163, 0.000000, 0.125382, 0.095840, 0.217975, 0.140170, 0.109240, 0.253971, 0.167774, 0.126970, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.086163, 0.000000, 0.125382, 0.095840, 0.217975, 0.140170, 0.109240, 0.253971, 0.167774, 0.126970, 0.310248, 0.207073, 0.158951, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.095840, 0.000000, 0.140170, 0.109240, 0.253971, 0.167774, 0.126970, 0.310248, 0.207073, 0.158951, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.095840, 0.000000, 0.140170, 0.109240, 0.253971, 0.167774, 0.126970, 0.310248, 0.207073, 0.158951, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.095840, 0.000000, 0.140170, 0.109240, 0.253971, 0.167774, 0.126970, 0.310248, 0.207073, 0.158951, 0.410903, 0.273974, 0.202873, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.109240, 0.000000, 0.167774, 0.126970, 0.310248, 0.207073, 0.158951, 0.410903, 0.273974, 0.202873, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.109240, 0.000000, 0.167774, 0.126970, 0.310248, 0.207073, 0.158951, 0.410903, 0.273974, 0.202873, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.109240, 0.000000, 0.167774, 0.126970, 0.310248, 0.207073, 0.158951, 0.410903, 0.273974, 0.202873, 0.526401, 0.364610, 0.278455, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.126970, 0.000000, 0.207073, 0.158951, 0.410903, 0.273974, 0.202873, 0.526401, 0.364610, 0.278455, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.126970, 0.000000, 0.207073, 0.158951, 0.410903, 0.273974, 0.202873, 0.526401, 0.364610, 0.278455, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.126970, 0.000000, 0.207073, 0.158951, 0.410903, 0.273974, 0.202873, 0.526401, 0.364610, 0.278455, 0.763876, 0.515549, 0.383991, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.158951, 0.000000, 0.273974, 0.202873, 0.526401, 0.364610, 0.278455, 0.763876, 0.515549, 0.383991, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.158951, 0.000000, 0.273974, 0.202873, 0.526401, 0.364610, 0.278455, 0.763876, 0.515549, 0.383991, 0.000000, 0.000000,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.158951, 0.000000, 0.273974, 0.202873, 0.526401, 0.364610, 0.278455, 0.763876, 0.515549, 0.383991, 1.094606, 0.740793,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.202873, 0.000000, 0.364610, 0.278455, 0.763876, 0.515549, 0.383991, 1.094606, 0.740793,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.202873, 0.000000, 0.364610, 0.278455, 0.763876, 0.515549, 0.383991, 1.094606, 0.740793,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.202873, 0.000000, 0.364610, 0.278455, 0.763876, 0.515549, 0.383991, 1.094606, 0.740793,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.278455, 0.000000, 0.515549, 0.383991, 1.094606, 0.740793,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.278455, 0.000000, 0.515549, 0.383991, 1.094606, 0.740793,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.278455, 0.000000, 0.515549, 0.383991, 1.094606, 0.740793,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.383991, 0.000000, 0.740793,],
[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.383991, 0.000000, 0.740793,]
])
e = np.matrix([
0.000000,
1.000000,
2.000000,
3.000000,
4.000000,
5.000000,
6.000000,
7.000000,
8.000000,
16.000000,
16.600000,
17.200000,
17.800000,
18.400000,
19.000000,
19.600000,
20.200000,
18.000000,
17.000000,
16.000000,
15.000000,
14.000000,
13.000000,
12.000000,
11.000000,
10.000000,
9.000000,
8.000000,
7.000000,
6.000000,
5.000000,
4.000000,
3.000000,
2.000000,
1.000000,
0.000000,
]).T
rho = 0.002500