This commit is contained in:
higepi 2022-12-09 09:03:36 +01:00
commit e36a125f44
19 changed files with 1544 additions and 94 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

1313
D3/TP/TP_SETI_MLP/TP2.ipynb Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -0,0 +1,201 @@
x1;x2
0.0625;0.0775
0.3475;0.1425
0.8325;0.5825
0.1025;0.8875
0.5225;0.1525
0.2575;0.5425
0.1975;0.1725
0.9425;0.6125
0.9725;0.6025
0.3025;0.0625
0.6775;0.9175
0.9825;0.8025
0.7625;0.5225
0.2175;0.9325
0.6075;0.6375
0.5025;0.1475
0.9175;0.8625
0.7975;0.4925
0.7275;0.2225
0.9775;0.7525
0.5475;0.0075
0.5875;0.1775
0.1475;0.2575
0.0975;0.3275
0.8125;0.3775
0.7575;0.3325
0.6925;0.6625
0.0925;0.2925
0.7425;0.0225
0.1275;0.3825
0.5625;0.0925
0.1075;0.9375
0.1675;0.3975
0.7525;0.1625
0.2925;0.1375
0.3775;0.2275
0.9875;0.6425
0.8375;0.6075
0.3175;0.0275
0.4575;0.6475
0.4225;0.0475
0.4625;0.5925
0.7075;0.8325
0.0575;0.3225
0.6675;0.1325
0.3575;0.9425
0.5275;0.3925
0.2875;0.0525
0.6575;0.0675
0.9325;0.7925
0.5425;0.8575
0.3075;0.1975
0.9625;0.2675
0.9575;0.0425
0.5525;0.2725
0.2825;0.0725
0.7825;0.4825
0.7125;0.3875
0.4125;0.4125
0.2375;0.7275
0.4975;0.8975
0.4525;0.1925
0.3625;0.2775
0.5975;0.3725
0.6825;0.3425
0.3275;0.5475
0.4425;0.0975
0.8225;0.0875
0.9275;0.6575
0.2225;0.7375
0.0525;0.6975
0.6175;0.9775
0.8475;0.8425
0.9125;0.6225
0.5375;0.8225
0.1125;0.2325
0.1575;0.2975
0.7875;0.9275
0.5125;0.2075
0.0075;0.5025
0.5925;0.5625
0.8275;0.0375
0.2425;0.5125
0.7675;0.3025
0.6125;0.9625
0.4175;0.9225
0.0275;0.6325
0.7175;0.0325
0.4825;0.4375
0.2675;0.2125
0.8975;0.0575
0.0325;0.7625
0.3925;0.2025
0.3675;0.9975
0.0175;0.3075
0.2475;0.1225
0.4025;0.0825
0.6625;0.9575
0.6325;0.1675
0.1425;0.3375
0.9075;0.8275
0.2625;0.0125
0.7325;0.2425
0.8025;0.2175
0.7925;0.8175
0.5175;0.8675
0.1875;0.3125
0.3425;0.0175
0.4275;0.7675
0.2275;0.4025
0.4775;0.6875
0.9375;0.9675
0.5675;0.5075
0.6425;0.3625
0.0425;0.2625
0.6225;0.6775
0.0025;0.1875
0.5075;0.7025
0.8525;0.4575
0.1725;0.2875
0.6725;0.3175
0.3125;0.4675
0.1775;0.5375
0.8825;0.7475
0.8775;0.7075
0.6025;0.9475
0.5575;0.6825
0.9675;0.5575
0.2975;0.1075
0.3325;0.7975
0.8575;0.9825
0.6375;0.4875
0.8625;0.6525
0.4675;0.9125
0.2725;0.7775
0.6525;0.7575
0.2075;0.3575
0.1925;0.6925
0.0125;0.4325
0.3975;0.4225
0.5725;0.1575
0.9025;0.8375
0.3375;0.9925
0.1825;0.1025
0.5775;0.1125
0.7775;0.3525
0.7375;0.6675
0.9525;0.2825
0.7475;0.7125
0.6475;0.7825
0.7225;0.4475
0.8925;0.3475
0.3725;0.9875
0.3225;0.8125
0.6275;0.6725
0.5825;0.7225
0.1375;0.7425
0.8075;0.5675
0.3875;0.8475
0.8675;0.5775
0.0825;0.4625
0.0875;0.7325
0.9975;0.4975
0.2525;0.5325
0.9925;0.3675
0.8875;0.9725
0.2325;0.0025
0.4875;0.4725
0.6875;0.7725
0.4725;0.1825
0.8425;0.7875
0.4925;0.1275
0.2125;0.5975
0.4075;0.8525
0.0675;0.4525
0.1225;0.5525
0.4325;0.6275
0.0775;0.2525
0.2775;0.4175
0.0375;0.8825
0.9475;0.8775
0.8175;0.7175
0.6975;0.9075
0.3525;0.8925
0.5325;0.4775
0.1175;0.9525
0.3825;0.5725
0.4475;0.9025
0.0225;0.2475
0.1325;0.4425
0.0475;0.4275
0.8725;0.6175
0.9225;0.8725
0.1625;0.5875
0.7025;0.8075
0.7725;0.5275
0.4375;0.5175
0.1525;0.4075
0.0725;0.2375
0.2025;0.1175
1 x1 x2
2 0.0625 0.0775
3 0.3475 0.1425
4 0.8325 0.5825
5 0.1025 0.8875
6 0.5225 0.1525
7 0.2575 0.5425
8 0.1975 0.1725
9 0.9425 0.6125
10 0.9725 0.6025
11 0.3025 0.0625
12 0.6775 0.9175
13 0.9825 0.8025
14 0.7625 0.5225
15 0.2175 0.9325
16 0.6075 0.6375
17 0.5025 0.1475
18 0.9175 0.8625
19 0.7975 0.4925
20 0.7275 0.2225
21 0.9775 0.7525
22 0.5475 0.0075
23 0.5875 0.1775
24 0.1475 0.2575
25 0.0975 0.3275
26 0.8125 0.3775
27 0.7575 0.3325
28 0.6925 0.6625
29 0.0925 0.2925
30 0.7425 0.0225
31 0.1275 0.3825
32 0.5625 0.0925
33 0.1075 0.9375
34 0.1675 0.3975
35 0.7525 0.1625
36 0.2925 0.1375
37 0.3775 0.2275
38 0.9875 0.6425
39 0.8375 0.6075
40 0.3175 0.0275
41 0.4575 0.6475
42 0.4225 0.0475
43 0.4625 0.5925
44 0.7075 0.8325
45 0.0575 0.3225
46 0.6675 0.1325
47 0.3575 0.9425
48 0.5275 0.3925
49 0.2875 0.0525
50 0.6575 0.0675
51 0.9325 0.7925
52 0.5425 0.8575
53 0.3075 0.1975
54 0.9625 0.2675
55 0.9575 0.0425
56 0.5525 0.2725
57 0.2825 0.0725
58 0.7825 0.4825
59 0.7125 0.3875
60 0.4125 0.4125
61 0.2375 0.7275
62 0.4975 0.8975
63 0.4525 0.1925
64 0.3625 0.2775
65 0.5975 0.3725
66 0.6825 0.3425
67 0.3275 0.5475
68 0.4425 0.0975
69 0.8225 0.0875
70 0.9275 0.6575
71 0.2225 0.7375
72 0.0525 0.6975
73 0.6175 0.9775
74 0.8475 0.8425
75 0.9125 0.6225
76 0.5375 0.8225
77 0.1125 0.2325
78 0.1575 0.2975
79 0.7875 0.9275
80 0.5125 0.2075
81 0.0075 0.5025
82 0.5925 0.5625
83 0.8275 0.0375
84 0.2425 0.5125
85 0.7675 0.3025
86 0.6125 0.9625
87 0.4175 0.9225
88 0.0275 0.6325
89 0.7175 0.0325
90 0.4825 0.4375
91 0.2675 0.2125
92 0.8975 0.0575
93 0.0325 0.7625
94 0.3925 0.2025
95 0.3675 0.9975
96 0.0175 0.3075
97 0.2475 0.1225
98 0.4025 0.0825
99 0.6625 0.9575
100 0.6325 0.1675
101 0.1425 0.3375
102 0.9075 0.8275
103 0.2625 0.0125
104 0.7325 0.2425
105 0.8025 0.2175
106 0.7925 0.8175
107 0.5175 0.8675
108 0.1875 0.3125
109 0.3425 0.0175
110 0.4275 0.7675
111 0.2275 0.4025
112 0.4775 0.6875
113 0.9375 0.9675
114 0.5675 0.5075
115 0.6425 0.3625
116 0.0425 0.2625
117 0.6225 0.6775
118 0.0025 0.1875
119 0.5075 0.7025
120 0.8525 0.4575
121 0.1725 0.2875
122 0.6725 0.3175
123 0.3125 0.4675
124 0.1775 0.5375
125 0.8825 0.7475
126 0.8775 0.7075
127 0.6025 0.9475
128 0.5575 0.6825
129 0.9675 0.5575
130 0.2975 0.1075
131 0.3325 0.7975
132 0.8575 0.9825
133 0.6375 0.4875
134 0.8625 0.6525
135 0.4675 0.9125
136 0.2725 0.7775
137 0.6525 0.7575
138 0.2075 0.3575
139 0.1925 0.6925
140 0.0125 0.4325
141 0.3975 0.4225
142 0.5725 0.1575
143 0.9025 0.8375
144 0.3375 0.9925
145 0.1825 0.1025
146 0.5775 0.1125
147 0.7775 0.3525
148 0.7375 0.6675
149 0.9525 0.2825
150 0.7475 0.7125
151 0.6475 0.7825
152 0.7225 0.4475
153 0.8925 0.3475
154 0.3725 0.9875
155 0.3225 0.8125
156 0.6275 0.6725
157 0.5825 0.7225
158 0.1375 0.7425
159 0.8075 0.5675
160 0.3875 0.8475
161 0.8675 0.5775
162 0.0825 0.4625
163 0.0875 0.7325
164 0.9975 0.4975
165 0.2525 0.5325
166 0.9925 0.3675
167 0.8875 0.9725
168 0.2325 0.0025
169 0.4875 0.4725
170 0.6875 0.7725
171 0.4725 0.1825
172 0.8425 0.7875
173 0.4925 0.1275
174 0.2125 0.5975
175 0.4075 0.8525
176 0.0675 0.4525
177 0.1225 0.5525
178 0.4325 0.6275
179 0.0775 0.2525
180 0.2775 0.4175
181 0.0375 0.8825
182 0.9475 0.8775
183 0.8175 0.7175
184 0.6975 0.9075
185 0.3525 0.8925
186 0.5325 0.4775
187 0.1175 0.9525
188 0.3825 0.5725
189 0.4475 0.9025
190 0.0225 0.2475
191 0.1325 0.4425
192 0.0475 0.4275
193 0.8725 0.6175
194 0.9225 0.8725
195 0.1625 0.5875
196 0.7025 0.8075
197 0.7725 0.5275
198 0.4375 0.5175
199 0.1525 0.4075
200 0.0725 0.2375
201 0.2025 0.1175

View file

@ -0,0 +1,30 @@
{
"cells": [],
"metadata": {
"kernelspec": {
"display_name": "Python 3.8.10 64-bit",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}

View file

@ -1,94 +0,0 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import scipy.spatial"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"clusters = 3\n",
"mean = np.random.randint(5, size=clusters)\n",
"sd = [0.25, 0.25, 0.3]\n",
"dim = 2\n",
"nb = 50\n",
"K= clusters"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"def gen_points(mean=1,sd=0.5, nb=100, dim=2, clusters=2):\n",
" size = []\n",
" # for i in range(0,dim):\n",
" size.append(nb)\n",
" size.append(dim)\n",
" points = np.random.normal(mean[0],sd[0],size=size)\n",
" for i in range(1,clusters):\n",
" points = np.concatenate((points,np.random.normal(mean[i],sd[i],size=size)),axis=0)\n",
" \n",
" return points"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"def distance(points,Pc): \n",
" return scipy.spatial.distance.cdist(points[:,:], Pc[:,:])"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"points = gen_points(mean,sd,nb,dim,clusters)\n",
"dist = distance(points,points)\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.8.10 64-bit",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}