Skip to content

Commit 8300a0a

Browse files
committed
Upload of data files + start chapter 9
1 parent 1c42268 commit 8300a0a

43 files changed

Lines changed: 21088 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Notebooks/Chapter 9.ipynb

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## Chapter 9 - Hierarchical Models"
8+
]
9+
},
10+
{
11+
"cell_type": "code",
12+
"execution_count": 2,
13+
"metadata": {
14+
"collapsed": true
15+
},
16+
"outputs": [],
17+
"source": [
18+
"# %load ../../standard_import.txt\n",
19+
"import pandas as pd\n",
20+
"import numpy as np\n",
21+
"import matplotlib.pyplot as plt\n",
22+
"import seaborn as sns\n",
23+
"\n",
24+
"pd.set_option('display.notebook_repr_html', False)\n",
25+
"\n",
26+
"#%config InlineBackend.figure_formats = {'pdf',}\n",
27+
"%matplotlib inline\n",
28+
"plt.style.use('seaborn-white')"
29+
]
30+
},
31+
{
32+
"cell_type": "markdown",
33+
"metadata": {},
34+
"source": [
35+
"### 9.2.4 - Example: Therapeutic touch"
36+
]
37+
},
38+
{
39+
"cell_type": "code",
40+
"execution_count": 3,
41+
"metadata": {
42+
"collapsed": false
43+
},
44+
"outputs": [
45+
{
46+
"name": "stdout",
47+
"output_type": "stream",
48+
"text": [
49+
"<class 'pandas.core.frame.DataFrame'>\n",
50+
"RangeIndex: 280 entries, 0 to 279\n",
51+
"Data columns (total 2 columns):\n",
52+
"y 280 non-null int64\n",
53+
"s 280 non-null object\n",
54+
"dtypes: int64(1), object(1)\n",
55+
"memory usage: 4.5+ KB\n"
56+
]
57+
}
58+
],
59+
"source": [
60+
"df = pd.read_csv('data/TherapeuticTouchData.csv')\n",
61+
"df.info()"
62+
]
63+
}
64+
],
65+
"metadata": {
66+
"kernelspec": {
67+
"display_name": "Python 3",
68+
"language": "python",
69+
"name": "python3"
70+
},
71+
"language_info": {
72+
"codemirror_mode": {
73+
"name": "ipython",
74+
"version": 3
75+
},
76+
"file_extension": ".py",
77+
"mimetype": "text/x-python",
78+
"name": "python",
79+
"nbconvert_exporter": "python",
80+
"pygments_lexer": "ipython3",
81+
"version": "3.5.1"
82+
}
83+
},
84+
"nbformat": 4,
85+
"nbformat_minor": 0
86+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
"Group","Y"
2+
"A",93.2041355866767
3+
"A",99.9697739894123
4+
"A",76.2171722634264
5+
"A",90.6089181604846
6+
"B",94.9947158689097
7+
"B",76.4507062962981
8+
"B",99.1635270585373
9+
"B",93.3910507762549
10+
"C",96.1568583861612
11+
"C",103.877907353428
12+
"C",81.4253735849949
13+
"C",86.5398606754162
14+
"D",82.863897645479
15+
"D",86.7219992770648
16+
"D",104.60813563522
17+
"D",97.8059674422363
18+
"E",102.646487985589
19+
"E",95.8917683505709
20+
"E",79.6168157996274
21+
"E",97.844927864213
22+
"F",103.959226513021
23+
"F",92.054451368933
24+
"F",82.1703854147245
25+
"F",101.815936703321
26+
"G",86.9230954840843
27+
"G",93.4855808303642
28+
"G",93.3071958960718
29+
"G",110.28412778948
30+
"H",98.0967997650696
31+
"H",101.255359092543
32+
"H",105.864417680294
33+
"H",82.7834234620937
34+
"I",84.5597033061792
35+
"I",97.8881317583269
36+
"I",101.06695028763
37+
"I",108.485214647864
38+
"J",96.7285266613481
39+
"J",113.3064770952
40+
"J",90.0038688827758
41+
"J",95.9611273606764
42+
"K",110.825878826
43+
"K",99.0604804763229
44+
"K",103.213032722916
45+
"K",86.9006079747618
46+
"L",110.280236919564
47+
"L",95.3174402511083
48+
"L",108.558353218427
49+
"L",89.8439696109001
50+
"M",103.84557350607
51+
"M",99.9407616370772
52+
"M",114.19671599823
53+
"M",90.0169488586222
54+
"N",103.338369482135
55+
"N",89.0850662047118
56+
"N",112.443331524452
57+
"N",107.133232788701
58+
"O",90.2478573579484
59+
"O",107.806165720453
60+
"O",113.817080057715
61+
"O",104.128896863883
62+
"P",96.5006379421743
63+
"P",105.716614520461
64+
"P",98.9676212369062
65+
"P",118.815126300459
66+
"Q",97.1227394709454
67+
"Q",120.228025750305
68+
"Q",104.814950325581
69+
"Q",101.834284453169
70+
"R",109.498257751304
71+
"R",119.904768752541
72+
"R",97.2249584853789
73+
"R",101.372015010776
74+
"S",109.861434536303
75+
"S",95.6280952468599
76+
"S",106.613095311758
77+
"S",119.89737490508
78+
"T",95.3328987246139
79+
"T",118.489854030809
80+
"T",113.774542080761
81+
"T",108.402705163817
82+
"U",108.566893721221
83+
"U",100.35677642245
84+
"U",124.012004196288
85+
"U",107.064325660041

0 commit comments

Comments
 (0)