Skip to content

Commit af88fbf

Browse files
Kia TeymourianKia Teymourian
Kia Teymourian
authored and
Kia Teymourian
committed
Distance Matrix example
1 parent 5f63957 commit af88fbf

21 files changed

+1402
-526
lines changed

Code-Example-006-Matplotlib-Visualization-Hist-boxplot.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
],
309309
"metadata": {
310310
"kernelspec": {
311-
"display_name": "Python 3",
311+
"display_name": "Python 3 (ipykernel)",
312312
"language": "python",
313313
"name": "python3"
314314
},
@@ -322,7 +322,7 @@
322322
"name": "python",
323323
"nbconvert_exporter": "python",
324324
"pygments_lexer": "ipython3",
325-
"version": "3.8.3"
325+
"version": "3.9.7"
326326
}
327327
},
328328
"nbformat": 4,

Code-Example-007-Normal_Distribution_with_Scipy.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@
262262
"provenance": []
263263
},
264264
"kernelspec": {
265-
"display_name": "Python 3",
265+
"display_name": "Python 3 (ipykernel)",
266266
"language": "python",
267267
"name": "python3"
268268
},
@@ -276,7 +276,7 @@
276276
"name": "python",
277277
"nbconvert_exporter": "python",
278278
"pygments_lexer": "ipython3",
279-
"version": "3.8.3"
279+
"version": "3.9.7"
280280
}
281281
},
282282
"nbformat": 4,

Code-Example-008-t-distribution-scipy-functions.ipynb

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
{
2323
"cell_type": "code",
24-
"execution_count": 3,
24+
"execution_count": 1,
2525
"metadata": {},
2626
"outputs": [],
2727
"source": [
@@ -31,7 +31,7 @@
3131
},
3232
{
3333
"cell_type": "code",
34-
"execution_count": 4,
34+
"execution_count": 2,
3535
"metadata": {},
3636
"outputs": [
3737
{
@@ -40,7 +40,7 @@
4040
"'1.7.1'"
4141
]
4242
},
43-
"execution_count": 4,
43+
"execution_count": 2,
4444
"metadata": {},
4545
"output_type": "execute_result"
4646
}
@@ -52,7 +52,7 @@
5252
},
5353
{
5454
"cell_type": "code",
55-
"execution_count": 5,
55+
"execution_count": 3,
5656
"metadata": {},
5757
"outputs": [
5858
{
@@ -61,7 +61,7 @@
6161
"0.9745751901857019"
6262
]
6363
},
64-
"execution_count": 5,
64+
"execution_count": 3,
6565
"metadata": {},
6666
"output_type": "execute_result"
6767
}
@@ -70,6 +70,26 @@
7070
"t.cdf(2.76, df=4, loc=0, scale=1)"
7171
]
7272
},
73+
{
74+
"cell_type": "code",
75+
"execution_count": 4,
76+
"metadata": {},
77+
"outputs": [
78+
{
79+
"data": {
80+
"text/plain": [
81+
"0.9745751901857019"
82+
]
83+
},
84+
"execution_count": 4,
85+
"metadata": {},
86+
"output_type": "execute_result"
87+
}
88+
],
89+
"source": [
90+
"t.cdf(2.76, df=4)"
91+
]
92+
},
7393
{
7494
"cell_type": "code",
7595
"execution_count": 6,
@@ -247,7 +267,7 @@
247267
],
248268
"metadata": {
249269
"kernelspec": {
250-
"display_name": "Python 3",
270+
"display_name": "Python 3 (ipykernel)",
251271
"language": "python",
252272
"name": "python3"
253273
},
@@ -261,7 +281,7 @@
261281
"name": "python",
262282
"nbconvert_exporter": "python",
263283
"pygments_lexer": "ipython3",
264-
"version": "3.8.3"
284+
"version": "3.9.7"
265285
}
266286
},
267287
"nbformat": 4,

Code-Example-008.1-t-distribution-vs.-normal-distribution.ipynb

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

Code-Example-009-t-test-using-researchpy.ipynb

Lines changed: 156 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
{
2525
"cell_type": "code",
26-
"execution_count": 3,
26+
"execution_count": 4,
2727
"metadata": {},
2828
"outputs": [
2929
{
@@ -50,6 +50,159 @@
5050
"df.info()"
5151
]
5252
},
53+
{
54+
"cell_type": "code",
55+
"execution_count": 5,
56+
"metadata": {},
57+
"outputs": [
58+
{
59+
"data": {
60+
"text/html": [
61+
"<div>\n",
62+
"<style scoped>\n",
63+
" .dataframe tbody tr th:only-of-type {\n",
64+
" vertical-align: middle;\n",
65+
" }\n",
66+
"\n",
67+
" .dataframe tbody tr th {\n",
68+
" vertical-align: top;\n",
69+
" }\n",
70+
"\n",
71+
" .dataframe thead th {\n",
72+
" text-align: right;\n",
73+
" }\n",
74+
"</style>\n",
75+
"<table border=\"1\" class=\"dataframe\">\n",
76+
" <thead>\n",
77+
" <tr style=\"text-align: right;\">\n",
78+
" <th></th>\n",
79+
" <th>patient</th>\n",
80+
" <th>sex</th>\n",
81+
" <th>agegrp</th>\n",
82+
" <th>bp_before</th>\n",
83+
" <th>bp_after</th>\n",
84+
" </tr>\n",
85+
" </thead>\n",
86+
" <tbody>\n",
87+
" <tr>\n",
88+
" <th>0</th>\n",
89+
" <td>1</td>\n",
90+
" <td>Male</td>\n",
91+
" <td>30-45</td>\n",
92+
" <td>143</td>\n",
93+
" <td>153</td>\n",
94+
" </tr>\n",
95+
" <tr>\n",
96+
" <th>1</th>\n",
97+
" <td>2</td>\n",
98+
" <td>Male</td>\n",
99+
" <td>30-45</td>\n",
100+
" <td>163</td>\n",
101+
" <td>170</td>\n",
102+
" </tr>\n",
103+
" <tr>\n",
104+
" <th>2</th>\n",
105+
" <td>3</td>\n",
106+
" <td>Male</td>\n",
107+
" <td>30-45</td>\n",
108+
" <td>153</td>\n",
109+
" <td>168</td>\n",
110+
" </tr>\n",
111+
" <tr>\n",
112+
" <th>3</th>\n",
113+
" <td>4</td>\n",
114+
" <td>Male</td>\n",
115+
" <td>30-45</td>\n",
116+
" <td>153</td>\n",
117+
" <td>142</td>\n",
118+
" </tr>\n",
119+
" <tr>\n",
120+
" <th>4</th>\n",
121+
" <td>5</td>\n",
122+
" <td>Male</td>\n",
123+
" <td>30-45</td>\n",
124+
" <td>146</td>\n",
125+
" <td>141</td>\n",
126+
" </tr>\n",
127+
" <tr>\n",
128+
" <th>...</th>\n",
129+
" <td>...</td>\n",
130+
" <td>...</td>\n",
131+
" <td>...</td>\n",
132+
" <td>...</td>\n",
133+
" <td>...</td>\n",
134+
" </tr>\n",
135+
" <tr>\n",
136+
" <th>115</th>\n",
137+
" <td>116</td>\n",
138+
" <td>Female</td>\n",
139+
" <td>60+</td>\n",
140+
" <td>152</td>\n",
141+
" <td>152</td>\n",
142+
" </tr>\n",
143+
" <tr>\n",
144+
" <th>116</th>\n",
145+
" <td>117</td>\n",
146+
" <td>Female</td>\n",
147+
" <td>60+</td>\n",
148+
" <td>161</td>\n",
149+
" <td>152</td>\n",
150+
" </tr>\n",
151+
" <tr>\n",
152+
" <th>117</th>\n",
153+
" <td>118</td>\n",
154+
" <td>Female</td>\n",
155+
" <td>60+</td>\n",
156+
" <td>165</td>\n",
157+
" <td>174</td>\n",
158+
" </tr>\n",
159+
" <tr>\n",
160+
" <th>118</th>\n",
161+
" <td>119</td>\n",
162+
" <td>Female</td>\n",
163+
" <td>60+</td>\n",
164+
" <td>149</td>\n",
165+
" <td>151</td>\n",
166+
" </tr>\n",
167+
" <tr>\n",
168+
" <th>119</th>\n",
169+
" <td>120</td>\n",
170+
" <td>Female</td>\n",
171+
" <td>60+</td>\n",
172+
" <td>185</td>\n",
173+
" <td>163</td>\n",
174+
" </tr>\n",
175+
" </tbody>\n",
176+
"</table>\n",
177+
"<p>120 rows × 5 columns</p>\n",
178+
"</div>"
179+
],
180+
"text/plain": [
181+
" patient sex agegrp bp_before bp_after\n",
182+
"0 1 Male 30-45 143 153\n",
183+
"1 2 Male 30-45 163 170\n",
184+
"2 3 Male 30-45 153 168\n",
185+
"3 4 Male 30-45 153 142\n",
186+
"4 5 Male 30-45 146 141\n",
187+
".. ... ... ... ... ...\n",
188+
"115 116 Female 60+ 152 152\n",
189+
"116 117 Female 60+ 161 152\n",
190+
"117 118 Female 60+ 165 174\n",
191+
"118 119 Female 60+ 149 151\n",
192+
"119 120 Female 60+ 185 163\n",
193+
"\n",
194+
"[120 rows x 5 columns]"
195+
]
196+
},
197+
"execution_count": 5,
198+
"metadata": {},
199+
"output_type": "execute_result"
200+
}
201+
],
202+
"source": [
203+
"df"
204+
]
205+
},
53206
{
54207
"cell_type": "code",
55208
"execution_count": 4,
@@ -117,7 +270,7 @@
117270
],
118271
"metadata": {
119272
"kernelspec": {
120-
"display_name": "Python 3",
273+
"display_name": "Python 3 (ipykernel)",
121274
"language": "python",
122275
"name": "python3"
123276
},
@@ -131,7 +284,7 @@
131284
"name": "python",
132285
"nbconvert_exporter": "python",
133286
"pygments_lexer": "ipython3",
134-
"version": "3.8.3"
287+
"version": "3.9.7"
135288
}
136289
},
137290
"nbformat": 4,

Code-Example-009.1-Two-Sample-t-test.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@
511511
],
512512
"metadata": {
513513
"kernelspec": {
514-
"display_name": "Python 3",
514+
"display_name": "Python 3 (ipykernel)",
515515
"language": "python",
516516
"name": "python3"
517517
},
@@ -525,7 +525,7 @@
525525
"name": "python",
526526
"nbconvert_exporter": "python",
527527
"pygments_lexer": "ipython3",
528-
"version": "3.8.3"
528+
"version": "3.9.7"
529529
}
530530
},
531531
"nbformat": 4,

Code-Example-011-Linear-Regression-Residual-Plots.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@
489489
],
490490
"metadata": {
491491
"kernelspec": {
492-
"display_name": "Python 3",
492+
"display_name": "Python 3 (ipykernel)",
493493
"language": "python",
494494
"name": "python3"
495495
},
@@ -503,7 +503,7 @@
503503
"name": "python",
504504
"nbconvert_exporter": "python",
505505
"pygments_lexer": "ipython3",
506-
"version": "3.8.3"
506+
"version": "3.9.7"
507507
}
508508
},
509509
"nbformat": 4,

Code-Example-011-Linear-Regression.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
],
351351
"metadata": {
352352
"kernelspec": {
353-
"display_name": "Python 3",
353+
"display_name": "Python 3 (ipykernel)",
354354
"language": "python",
355355
"name": "python3"
356356
},
@@ -364,7 +364,7 @@
364364
"name": "python",
365365
"nbconvert_exporter": "python",
366366
"pygments_lexer": "ipython3",
367-
"version": "3.8.3"
367+
"version": "3.9.7"
368368
}
369369
},
370370
"nbformat": 4,

0 commit comments

Comments
 (0)