Skip to content

Commit 5de2a7e

Browse files
committedSep 2, 2021
Adding code for question 2
1 parent bed0fbb commit 5de2a7e

File tree

2 files changed

+1605
-271
lines changed

2 files changed

+1605
-271
lines changed
 

‎data/happiness.csv

+1,301
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,1301 @@
1+
age,married,happiness
2+
65,0,-2
3+
65,0,-1.7894736842105263
4+
65,1,-1.5789473684210527
5+
65,0,-1.368421052631579
6+
65,0,-1.1578947368421053
7+
65,0,-0.9473684210526316
8+
65,1,-0.736842105263158
9+
65,1,-0.5263157894736843
10+
65,0,-0.3157894736842106
11+
65,0,-0.10526315789473695
12+
65,1,0.10526315789473673
13+
65,1,0.3157894736842106
14+
65,1,0.5263157894736841
15+
65,1,0.7368421052631575
16+
65,0,0.9473684210526314
17+
65,1,1.1578947368421053
18+
65,1,1.3684210526315788
19+
65,1,1.5789473684210522
20+
65,1,1.789473684210526
21+
65,1,2
22+
64,0,-2
23+
64,0,-1.7894736842105263
24+
64,0,-1.5789473684210527
25+
64,0,-1.368421052631579
26+
64,0,-1.1578947368421053
27+
64,0,-0.9473684210526316
28+
64,0,-0.736842105263158
29+
64,1,-0.5263157894736843
30+
64,0,-0.3157894736842106
31+
64,0,-0.10526315789473695
32+
64,1,0.10526315789473673
33+
64,1,0.3157894736842106
34+
64,1,0.5263157894736841
35+
64,1,0.7368421052631575
36+
64,0,0.9473684210526314
37+
64,1,1.1578947368421053
38+
64,1,1.3684210526315788
39+
64,1,1.5789473684210522
40+
64,1,1.789473684210526
41+
64,1,2
42+
63,0,-2
43+
63,0,-1.7894736842105263
44+
63,1,-1.5789473684210527
45+
63,0,-1.368421052631579
46+
63,0,-1.1578947368421053
47+
63,0,-0.9473684210526316
48+
63,0,-0.736842105263158
49+
63,1,-0.5263157894736843
50+
63,0,-0.3157894736842106
51+
63,0,-0.10526315789473695
52+
63,0,0.10526315789473673
53+
63,1,0.3157894736842106
54+
63,1,0.5263157894736841
55+
63,1,0.7368421052631575
56+
63,1,0.9473684210526314
57+
63,1,1.1578947368421053
58+
63,1,1.3684210526315788
59+
63,1,1.5789473684210522
60+
63,1,1.789473684210526
61+
63,1,2
62+
62,0,-2
63+
62,0,-1.7894736842105263
64+
62,0,-1.5789473684210527
65+
62,0,-1.368421052631579
66+
62,1,-1.1578947368421053
67+
62,0,-0.9473684210526316
68+
62,0,-0.736842105263158
69+
62,1,-0.5263157894736843
70+
62,1,-0.3157894736842106
71+
62,0,-0.10526315789473695
72+
62,1,0.10526315789473673
73+
62,0,0.3157894736842106
74+
62,1,0.5263157894736841
75+
62,1,0.7368421052631575
76+
62,1,0.9473684210526314
77+
62,1,1.1578947368421053
78+
62,1,1.3684210526315788
79+
62,1,1.5789473684210522
80+
62,1,1.789473684210526
81+
62,1,2
82+
61,0,-2
83+
61,0,-1.7894736842105263
84+
61,0,-1.5789473684210527
85+
61,0,-1.368421052631579
86+
61,1,-1.1578947368421053
87+
61,0,-0.9473684210526316
88+
61,0,-0.736842105263158
89+
61,0,-0.5263157894736843
90+
61,1,-0.3157894736842106
91+
61,0,-0.10526315789473695
92+
61,1,0.10526315789473673
93+
61,0,0.3157894736842106
94+
61,1,0.5263157894736841
95+
61,1,0.7368421052631575
96+
61,1,0.9473684210526314
97+
61,1,1.1578947368421053
98+
61,1,1.3684210526315788
99+
61,1,1.5789473684210522
100+
61,1,1.789473684210526
101+
61,1,2
102+
60,0,-2
103+
60,0,-1.7894736842105263
104+
60,1,-1.5789473684210527
105+
60,1,-1.368421052631579
106+
60,0,-1.1578947368421053
107+
60,0,-0.9473684210526316
108+
60,0,-0.736842105263158
109+
60,0,-0.5263157894736843
110+
60,1,-0.3157894736842106
111+
60,1,-0.10526315789473695
112+
60,1,0.10526315789473673
113+
60,0,0.3157894736842106
114+
60,1,0.5263157894736841
115+
60,0,0.7368421052631575
116+
60,1,0.9473684210526314
117+
60,1,1.1578947368421053
118+
60,1,1.3684210526315788
119+
60,1,1.5789473684210522
120+
60,1,1.789473684210526
121+
60,1,2
122+
59,0,-2
123+
59,0,-1.7894736842105263
124+
59,0,-1.5789473684210527
125+
59,0,-1.368421052631579
126+
59,1,-1.1578947368421053
127+
59,0,-0.9473684210526316
128+
59,0,-0.736842105263158
129+
59,1,-0.5263157894736843
130+
59,0,-0.3157894736842106
131+
59,1,-0.10526315789473695
132+
59,0,0.10526315789473673
133+
59,1,0.3157894736842106
134+
59,1,0.5263157894736841
135+
59,1,0.7368421052631575
136+
59,1,0.9473684210526314
137+
59,1,1.1578947368421053
138+
59,1,1.3684210526315788
139+
59,1,1.5789473684210522
140+
59,1,1.789473684210526
141+
59,1,2
142+
58,0,-2
143+
58,1,-1.7894736842105263
144+
58,1,-1.5789473684210527
145+
58,0,-1.368421052631579
146+
58,0,-1.1578947368421053
147+
58,1,-0.9473684210526316
148+
58,0,-0.736842105263158
149+
58,1,-0.5263157894736843
150+
58,0,-0.3157894736842106
151+
58,1,-0.10526315789473695
152+
58,1,0.10526315789473673
153+
58,1,0.3157894736842106
154+
58,0,0.5263157894736841
155+
58,1,0.7368421052631575
156+
58,0,0.9473684210526314
157+
58,1,1.1578947368421053
158+
58,1,1.3684210526315788
159+
58,1,1.5789473684210522
160+
58,1,1.789473684210526
161+
58,1,2
162+
57,0,-2
163+
57,0,-1.7894736842105263
164+
57,0,-1.5789473684210527
165+
57,0,-1.368421052631579
166+
57,0,-1.1578947368421053
167+
57,0,-0.9473684210526316
168+
57,0,-0.736842105263158
169+
57,1,-0.5263157894736843
170+
57,0,-0.3157894736842106
171+
57,1,-0.10526315789473695
172+
57,1,0.10526315789473673
173+
57,1,0.3157894736842106
174+
57,1,0.5263157894736841
175+
57,0,0.7368421052631575
176+
57,1,0.9473684210526314
177+
57,1,1.1578947368421053
178+
57,1,1.3684210526315788
179+
57,1,1.5789473684210522
180+
57,1,1.789473684210526
181+
57,1,2
182+
56,0,-2
183+
56,0,-1.7894736842105263
184+
56,0,-1.5789473684210527
185+
56,0,-1.368421052631579
186+
56,0,-1.1578947368421053
187+
56,1,-0.9473684210526316
188+
56,1,-0.736842105263158
189+
56,1,-0.5263157894736843
190+
56,0,-0.3157894736842106
191+
56,0,-0.10526315789473695
192+
56,0,0.10526315789473673
193+
56,1,0.3157894736842106
194+
56,1,0.5263157894736841
195+
56,1,0.7368421052631575
196+
56,1,0.9473684210526314
197+
56,1,1.1578947368421053
198+
56,1,1.3684210526315788
199+
56,1,1.5789473684210522
200+
56,1,1.789473684210526
201+
56,1,2
202+
55,0,-2
203+
55,0,-1.7894736842105263
204+
55,0,-1.5789473684210527
205+
55,0,-1.368421052631579
206+
55,0,-1.1578947368421053
207+
55,0,-0.9473684210526316
208+
55,0,-0.736842105263158
209+
55,0,-0.5263157894736843
210+
55,0,-0.3157894736842106
211+
55,1,-0.10526315789473695
212+
55,1,0.10526315789473673
213+
55,0,0.3157894736842106
214+
55,1,0.5263157894736841
215+
55,1,0.7368421052631575
216+
55,1,0.9473684210526314
217+
55,1,1.1578947368421053
218+
55,0,1.3684210526315788
219+
55,1,1.5789473684210522
220+
55,1,1.789473684210526
221+
55,1,2
222+
54,0,-2
223+
54,0,-1.7894736842105263
224+
54,1,-1.5789473684210527
225+
54,0,-1.368421052631579
226+
54,1,-1.1578947368421053
227+
54,0,-0.9473684210526316
228+
54,1,-0.736842105263158
229+
54,0,-0.5263157894736843
230+
54,1,-0.3157894736842106
231+
54,1,-0.10526315789473695
232+
54,1,0.10526315789473673
233+
54,1,0.3157894736842106
234+
54,1,0.5263157894736841
235+
54,1,0.7368421052631575
236+
54,1,0.9473684210526314
237+
54,1,1.1578947368421053
238+
54,1,1.3684210526315788
239+
54,1,1.5789473684210522
240+
54,1,1.789473684210526
241+
54,1,2
242+
53,0,-2
243+
53,0,-1.7894736842105263
244+
53,0,-1.5789473684210527
245+
53,0,-1.368421052631579
246+
53,0,-1.1578947368421053
247+
53,0,-0.9473684210526316
248+
53,0,-0.736842105263158
249+
53,1,-0.5263157894736843
250+
53,0,-0.3157894736842106
251+
53,0,-0.10526315789473695
252+
53,0,0.10526315789473673
253+
53,1,0.3157894736842106
254+
53,0,0.5263157894736841
255+
53,1,0.7368421052631575
256+
53,1,0.9473684210526314
257+
53,1,1.1578947368421053
258+
53,1,1.3684210526315788
259+
53,1,1.5789473684210522
260+
53,1,1.789473684210526
261+
53,1,2
262+
52,0,-2
263+
52,0,-1.7894736842105263
264+
52,1,-1.5789473684210527
265+
52,0,-1.368421052631579
266+
52,0,-1.1578947368421053
267+
52,0,-0.9473684210526316
268+
52,0,-0.736842105263158
269+
52,0,-0.5263157894736843
270+
52,1,-0.3157894736842106
271+
52,1,-0.10526315789473695
272+
52,1,0.10526315789473673
273+
52,1,0.3157894736842106
274+
52,1,0.5263157894736841
275+
52,1,0.7368421052631575
276+
52,1,0.9473684210526314
277+
52,0,1.1578947368421053
278+
52,1,1.3684210526315788
279+
52,1,1.5789473684210522
280+
52,1,1.789473684210526
281+
52,1,2
282+
51,0,-2
283+
51,0,-1.7894736842105263
284+
51,0,-1.5789473684210527
285+
51,0,-1.368421052631579
286+
51,1,-1.1578947368421053
287+
51,0,-0.9473684210526316
288+
51,0,-0.736842105263158
289+
51,0,-0.5263157894736843
290+
51,1,-0.3157894736842106
291+
51,1,-0.10526315789473695
292+
51,1,0.10526315789473673
293+
51,0,0.3157894736842106
294+
51,1,0.5263157894736841
295+
51,1,0.7368421052631575
296+
51,1,0.9473684210526314
297+
51,1,1.1578947368421053
298+
51,1,1.3684210526315788
299+
51,1,1.5789473684210522
300+
51,1,1.789473684210526
301+
51,1,2
302+
50,0,-2
303+
50,0,-1.7894736842105263
304+
50,0,-1.5789473684210527
305+
50,0,-1.368421052631579
306+
50,1,-1.1578947368421053
307+
50,1,-0.9473684210526316
308+
50,0,-0.736842105263158
309+
50,0,-0.5263157894736843
310+
50,0,-0.3157894736842106
311+
50,0,-0.10526315789473695
312+
50,0,0.10526315789473673
313+
50,0,0.3157894736842106
314+
50,0,0.5263157894736841
315+
50,1,0.7368421052631575
316+
50,1,0.9473684210526314
317+
50,0,1.1578947368421053
318+
50,1,1.3684210526315788
319+
50,1,1.5789473684210522
320+
50,1,1.789473684210526
321+
50,1,2
322+
49,0,-2
323+
49,0,-1.7894736842105263
324+
49,1,-1.5789473684210527
325+
49,0,-1.368421052631579
326+
49,1,-1.1578947368421053
327+
49,0,-0.9473684210526316
328+
49,0,-0.736842105263158
329+
49,0,-0.5263157894736843
330+
49,1,-0.3157894736842106
331+
49,0,-0.10526315789473695
332+
49,0,0.10526315789473673
333+
49,1,0.3157894736842106
334+
49,1,0.5263157894736841
335+
49,0,0.7368421052631575
336+
49,0,0.9473684210526314
337+
49,1,1.1578947368421053
338+
49,1,1.3684210526315788
339+
49,1,1.5789473684210522
340+
49,0,1.789473684210526
341+
49,1,2
342+
48,0,-2
343+
48,0,-1.7894736842105263
344+
48,0,-1.5789473684210527
345+
48,1,-1.368421052631579
346+
48,1,-1.1578947368421053
347+
48,0,-0.9473684210526316
348+
48,0,-0.736842105263158
349+
48,0,-0.5263157894736843
350+
48,0,-0.3157894736842106
351+
48,0,-0.10526315789473695
352+
48,0,0.10526315789473673
353+
48,1,0.3157894736842106
354+
48,1,0.5263157894736841
355+
48,0,0.7368421052631575
356+
48,1,0.9473684210526314
357+
48,1,1.1578947368421053
358+
48,1,1.3684210526315788
359+
48,1,1.5789473684210522
360+
48,1,1.789473684210526
361+
48,1,2
362+
47,0,-2
363+
47,0,-1.7894736842105263
364+
47,0,-1.5789473684210527
365+
47,0,-1.368421052631579
366+
47,0,-1.1578947368421053
367+
47,0,-0.9473684210526316
368+
47,0,-0.736842105263158
369+
47,0,-0.5263157894736843
370+
47,0,-0.3157894736842106
371+
47,1,-0.10526315789473695
372+
47,0,0.10526315789473673
373+
47,1,0.3157894736842106
374+
47,1,0.5263157894736841
375+
47,1,0.7368421052631575
376+
47,1,0.9473684210526314
377+
47,1,1.1578947368421053
378+
47,1,1.3684210526315788
379+
47,1,1.5789473684210522
380+
47,0,1.789473684210526
381+
47,1,2
382+
46,0,-2
383+
46,0,-1.7894736842105263
384+
46,0,-1.5789473684210527
385+
46,0,-1.368421052631579
386+
46,1,-1.1578947368421053
387+
46,0,-0.9473684210526316
388+
46,1,-0.736842105263158
389+
46,1,-0.5263157894736843
390+
46,1,-0.3157894736842106
391+
46,0,-0.10526315789473695
392+
46,1,0.10526315789473673
393+
46,1,0.3157894736842106
394+
46,0,0.5263157894736841
395+
46,1,0.7368421052631575
396+
46,1,0.9473684210526314
397+
46,1,1.1578947368421053
398+
46,1,1.3684210526315788
399+
46,1,1.5789473684210522
400+
46,1,1.789473684210526
401+
46,1,2
402+
45,1,-2
403+
45,0,-1.7894736842105263
404+
45,0,-1.5789473684210527
405+
45,0,-1.368421052631579
406+
45,0,-1.1578947368421053
407+
45,0,-0.9473684210526316
408+
45,0,-0.736842105263158
409+
45,0,-0.5263157894736843
410+
45,0,-0.3157894736842106
411+
45,0,-0.10526315789473695
412+
45,1,0.10526315789473673
413+
45,1,0.3157894736842106
414+
45,0,0.5263157894736841
415+
45,1,0.7368421052631575
416+
45,1,0.9473684210526314
417+
45,1,1.1578947368421053
418+
45,1,1.3684210526315788
419+
45,1,1.5789473684210522
420+
45,1,1.789473684210526
421+
45,1,2
422+
44,0,-2
423+
44,0,-1.7894736842105263
424+
44,0,-1.5789473684210527
425+
44,0,-1.368421052631579
426+
44,0,-1.1578947368421053
427+
44,1,-0.9473684210526316
428+
44,0,-0.736842105263158
429+
44,0,-0.5263157894736843
430+
44,0,-0.3157894736842106
431+
44,1,-0.10526315789473695
432+
44,1,0.10526315789473673
433+
44,0,0.3157894736842106
434+
44,0,0.5263157894736841
435+
44,1,0.7368421052631575
436+
44,1,0.9473684210526314
437+
44,1,1.1578947368421053
438+
44,1,1.3684210526315788
439+
44,1,1.5789473684210522
440+
44,1,1.789473684210526
441+
44,1,2
442+
43,0,-2
443+
43,0,-1.7894736842105263
444+
43,0,-1.5789473684210527
445+
43,0,-1.368421052631579
446+
43,0,-1.1578947368421053
447+
43,0,-0.9473684210526316
448+
43,1,-0.736842105263158
449+
43,0,-0.5263157894736843
450+
43,0,-0.3157894736842106
451+
43,0,-0.10526315789473695
452+
43,0,0.10526315789473673
453+
43,0,0.3157894736842106
454+
43,1,0.5263157894736841
455+
43,0,0.7368421052631575
456+
43,0,0.9473684210526314
457+
43,0,1.1578947368421053
458+
43,1,1.3684210526315788
459+
43,0,1.5789473684210522
460+
43,1,1.789473684210526
461+
43,1,2
462+
42,0,-2
463+
42,0,-1.7894736842105263
464+
42,0,-1.5789473684210527
465+
42,0,-1.368421052631579
466+
42,0,-1.1578947368421053
467+
42,0,-0.9473684210526316
468+
42,0,-0.736842105263158
469+
42,0,-0.5263157894736843
470+
42,0,-0.3157894736842106
471+
42,0,-0.10526315789473695
472+
42,1,0.10526315789473673
473+
42,1,0.3157894736842106
474+
42,1,0.5263157894736841
475+
42,1,0.7368421052631575
476+
42,0,0.9473684210526314
477+
42,0,1.1578947368421053
478+
42,1,1.3684210526315788
479+
42,1,1.5789473684210522
480+
42,1,1.789473684210526
481+
42,1,2
482+
41,0,-2
483+
41,0,-1.7894736842105263
484+
41,0,-1.5789473684210527
485+
41,0,-1.368421052631579
486+
41,0,-1.1578947368421053
487+
41,0,-0.9473684210526316
488+
41,1,-0.736842105263158
489+
41,0,-0.5263157894736843
490+
41,0,-0.3157894736842106
491+
41,0,-0.10526315789473695
492+
41,0,0.10526315789473673
493+
41,0,0.3157894736842106
494+
41,1,0.5263157894736841
495+
41,0,0.7368421052631575
496+
41,1,0.9473684210526314
497+
41,1,1.1578947368421053
498+
41,1,1.3684210526315788
499+
41,1,1.5789473684210522
500+
41,1,1.789473684210526
501+
41,1,2
502+
40,0,-2
503+
40,0,-1.7894736842105263
504+
40,0,-1.5789473684210527
505+
40,0,-1.368421052631579
506+
40,1,-1.1578947368421053
507+
40,0,-0.9473684210526316
508+
40,0,-0.736842105263158
509+
40,1,-0.5263157894736843
510+
40,0,-0.3157894736842106
511+
40,1,-0.10526315789473695
512+
40,1,0.10526315789473673
513+
40,1,0.3157894736842106
514+
40,0,0.5263157894736841
515+
40,1,0.7368421052631575
516+
40,0,0.9473684210526314
517+
40,1,1.1578947368421053
518+
40,1,1.3684210526315788
519+
40,1,1.5789473684210522
520+
40,1,1.789473684210526
521+
40,1,2
522+
39,0,-2
523+
39,0,-1.7894736842105263
524+
39,0,-1.5789473684210527
525+
39,0,-1.368421052631579
526+
39,0,-1.1578947368421053
527+
39,0,-0.9473684210526316
528+
39,0,-0.736842105263158
529+
39,0,-0.5263157894736843
530+
39,1,-0.3157894736842106
531+
39,0,-0.10526315789473695
532+
39,0,0.10526315789473673
533+
39,0,0.3157894736842106
534+
39,1,0.5263157894736841
535+
39,0,0.7368421052631575
536+
39,1,0.9473684210526314
537+
39,1,1.1578947368421053
538+
39,1,1.3684210526315788
539+
39,1,1.5789473684210522
540+
39,1,1.789473684210526
541+
39,1,2
542+
38,0,-2
543+
38,0,-1.7894736842105263
544+
38,0,-1.5789473684210527
545+
38,0,-1.368421052631579
546+
38,1,-1.1578947368421053
547+
38,1,-0.9473684210526316
548+
38,0,-0.736842105263158
549+
38,0,-0.5263157894736843
550+
38,0,-0.3157894736842106
551+
38,1,-0.10526315789473695
552+
38,1,0.10526315789473673
553+
38,1,0.3157894736842106
554+
38,0,0.5263157894736841
555+
38,1,0.7368421052631575
556+
38,1,0.9473684210526314
557+
38,1,1.1578947368421053
558+
38,1,1.3684210526315788
559+
38,0,1.5789473684210522
560+
38,1,1.789473684210526
561+
38,1,2
562+
37,0,-2
563+
37,0,-1.7894736842105263
564+
37,0,-1.5789473684210527
565+
37,0,-1.368421052631579
566+
37,0,-1.1578947368421053
567+
37,0,-0.9473684210526316
568+
37,0,-0.736842105263158
569+
37,0,-0.5263157894736843
570+
37,0,-0.3157894736842106
571+
37,0,-0.10526315789473695
572+
37,0,0.10526315789473673
573+
37,0,0.3157894736842106
574+
37,0,0.5263157894736841
575+
37,1,0.7368421052631575
576+
37,0,0.9473684210526314
577+
37,1,1.1578947368421053
578+
37,1,1.3684210526315788
579+
37,1,1.5789473684210522
580+
37,0,1.789473684210526
581+
37,1,2
582+
36,0,-2
583+
36,0,-1.7894736842105263
584+
36,0,-1.5789473684210527
585+
36,0,-1.368421052631579
586+
36,0,-1.1578947368421053
587+
36,0,-0.9473684210526316
588+
36,0,-0.736842105263158
589+
36,0,-0.5263157894736843
590+
36,1,-0.3157894736842106
591+
36,0,-0.10526315789473695
592+
36,0,0.10526315789473673
593+
36,0,0.3157894736842106
594+
36,1,0.5263157894736841
595+
36,1,0.7368421052631575
596+
36,1,0.9473684210526314
597+
36,1,1.1578947368421053
598+
36,1,1.3684210526315788
599+
36,0,1.5789473684210522
600+
36,1,1.789473684210526
601+
36,1,2
602+
35,0,-2
603+
35,0,-1.7894736842105263
604+
35,0,-1.5789473684210527
605+
35,0,-1.368421052631579
606+
35,0,-1.1578947368421053
607+
35,0,-0.9473684210526316
608+
35,0,-0.736842105263158
609+
35,0,-0.5263157894736843
610+
35,0,-0.3157894736842106
611+
35,1,-0.10526315789473695
612+
35,0,0.10526315789473673
613+
35,1,0.3157894736842106
614+
35,0,0.5263157894736841
615+
35,1,0.7368421052631575
616+
35,1,0.9473684210526314
617+
35,1,1.1578947368421053
618+
35,1,1.3684210526315788
619+
35,1,1.5789473684210522
620+
35,1,1.789473684210526
621+
35,1,2
622+
34,0,-2
623+
34,0,-1.7894736842105263
624+
34,0,-1.5789473684210527
625+
34,1,-1.368421052631579
626+
34,0,-1.1578947368421053
627+
34,1,-0.9473684210526316
628+
34,0,-0.736842105263158
629+
34,0,-0.5263157894736843
630+
34,0,-0.3157894736842106
631+
34,1,-0.10526315789473695
632+
34,1,0.10526315789473673
633+
34,0,0.3157894736842106
634+
34,1,0.5263157894736841
635+
34,0,0.7368421052631575
636+
34,0,0.9473684210526314
637+
34,0,1.1578947368421053
638+
34,0,1.3684210526315788
639+
34,1,1.5789473684210522
640+
34,1,1.789473684210526
641+
34,1,2
642+
33,0,-2
643+
33,0,-1.7894736842105263
644+
33,0,-1.5789473684210527
645+
33,0,-1.368421052631579
646+
33,0,-1.1578947368421053
647+
33,1,-0.9473684210526316
648+
33,0,-0.736842105263158
649+
33,0,-0.5263157894736843
650+
33,1,-0.3157894736842106
651+
33,1,-0.10526315789473695
652+
33,0,0.10526315789473673
653+
33,0,0.3157894736842106
654+
33,0,0.5263157894736841
655+
33,1,0.7368421052631575
656+
33,0,0.9473684210526314
657+
33,1,1.1578947368421053
658+
33,1,1.3684210526315788
659+
33,1,1.5789473684210522
660+
33,1,1.789473684210526
661+
33,0,2
662+
32,0,-2
663+
32,0,-1.7894736842105263
664+
32,0,-1.5789473684210527
665+
32,0,-1.368421052631579
666+
32,0,-1.1578947368421053
667+
32,0,-0.9473684210526316
668+
32,0,-0.736842105263158
669+
32,0,-0.5263157894736843
670+
32,1,-0.3157894736842106
671+
32,0,-0.10526315789473695
672+
32,1,0.10526315789473673
673+
32,0,0.3157894736842106
674+
32,0,0.5263157894736841
675+
32,0,0.7368421052631575
676+
32,0,0.9473684210526314
677+
32,0,1.1578947368421053
678+
32,1,1.3684210526315788
679+
32,1,1.5789473684210522
680+
32,1,1.789473684210526
681+
32,1,2
682+
31,0,-2
683+
31,0,-1.7894736842105263
684+
31,0,-1.5789473684210527
685+
31,0,-1.368421052631579
686+
31,0,-1.1578947368421053
687+
31,0,-0.9473684210526316
688+
31,0,-0.736842105263158
689+
31,0,-0.5263157894736843
690+
31,0,-0.3157894736842106
691+
31,1,-0.10526315789473695
692+
31,1,0.10526315789473673
693+
31,1,0.3157894736842106
694+
31,0,0.5263157894736841
695+
31,0,0.7368421052631575
696+
31,1,0.9473684210526314
697+
31,0,1.1578947368421053
698+
31,0,1.3684210526315788
699+
31,1,1.5789473684210522
700+
31,0,1.789473684210526
701+
31,1,2
702+
30,0,-2
703+
30,0,-1.7894736842105263
704+
30,0,-1.5789473684210527
705+
30,0,-1.368421052631579
706+
30,0,-1.1578947368421053
707+
30,0,-0.9473684210526316
708+
30,0,-0.736842105263158
709+
30,0,-0.5263157894736843
710+
30,0,-0.3157894736842106
711+
30,0,-0.10526315789473695
712+
30,0,0.10526315789473673
713+
30,0,0.3157894736842106
714+
30,0,0.5263157894736841
715+
30,1,0.7368421052631575
716+
30,1,0.9473684210526314
717+
30,1,1.1578947368421053
718+
30,0,1.3684210526315788
719+
30,0,1.5789473684210522
720+
30,1,1.789473684210526
721+
30,1,2
722+
29,0,-2
723+
29,0,-1.7894736842105263
724+
29,0,-1.5789473684210527
725+
29,0,-1.368421052631579
726+
29,0,-1.1578947368421053
727+
29,0,-0.9473684210526316
728+
29,0,-0.736842105263158
729+
29,0,-0.5263157894736843
730+
29,0,-0.3157894736842106
731+
29,0,-0.10526315789473695
732+
29,1,0.10526315789473673
733+
29,0,0.3157894736842106
734+
29,1,0.5263157894736841
735+
29,0,0.7368421052631575
736+
29,0,0.9473684210526314
737+
29,0,1.1578947368421053
738+
29,0,1.3684210526315788
739+
29,1,1.5789473684210522
740+
29,1,1.789473684210526
741+
29,1,2
742+
28,0,-2
743+
28,0,-1.7894736842105263
744+
28,0,-1.5789473684210527
745+
28,0,-1.368421052631579
746+
28,0,-1.1578947368421053
747+
28,0,-0.9473684210526316
748+
28,0,-0.736842105263158
749+
28,0,-0.5263157894736843
750+
28,0,-0.3157894736842106
751+
28,0,-0.10526315789473695
752+
28,0,0.10526315789473673
753+
28,0,0.3157894736842106
754+
28,1,0.5263157894736841
755+
28,0,0.7368421052631575
756+
28,0,0.9473684210526314
757+
28,1,1.1578947368421053
758+
28,1,1.3684210526315788
759+
28,0,1.5789473684210522
760+
28,1,1.789473684210526
761+
28,1,2
762+
27,0,-2
763+
27,0,-1.7894736842105263
764+
27,0,-1.5789473684210527
765+
27,0,-1.368421052631579
766+
27,0,-1.1578947368421053
767+
27,0,-0.9473684210526316
768+
27,0,-0.736842105263158
769+
27,0,-0.5263157894736843
770+
27,0,-0.3157894736842106
771+
27,0,-0.10526315789473695
772+
27,1,0.10526315789473673
773+
27,0,0.3157894736842106
774+
27,0,0.5263157894736841
775+
27,0,0.7368421052631575
776+
27,0,0.9473684210526314
777+
27,1,1.1578947368421053
778+
27,0,1.3684210526315788
779+
27,1,1.5789473684210522
780+
27,1,1.789473684210526
781+
27,1,2
782+
26,0,-2
783+
26,0,-1.7894736842105263
784+
26,0,-1.5789473684210527
785+
26,0,-1.368421052631579
786+
26,0,-1.1578947368421053
787+
26,0,-0.9473684210526316
788+
26,0,-0.736842105263158
789+
26,0,-0.5263157894736843
790+
26,0,-0.3157894736842106
791+
26,0,-0.10526315789473695
792+
26,0,0.10526315789473673
793+
26,0,0.3157894736842106
794+
26,0,0.5263157894736841
795+
26,0,0.7368421052631575
796+
26,1,0.9473684210526314
797+
26,0,1.1578947368421053
798+
26,0,1.3684210526315788
799+
26,1,1.5789473684210522
800+
26,1,1.789473684210526
801+
26,0,2
802+
25,0,-2
803+
25,0,-1.7894736842105263
804+
25,0,-1.5789473684210527
805+
25,0,-1.368421052631579
806+
25,0,-1.1578947368421053
807+
25,0,-0.9473684210526316
808+
25,0,-0.736842105263158
809+
25,0,-0.5263157894736843
810+
25,0,-0.3157894736842106
811+
25,0,-0.10526315789473695
812+
25,0,0.10526315789473673
813+
25,1,0.3157894736842106
814+
25,1,0.5263157894736841
815+
25,1,0.7368421052631575
816+
25,0,0.9473684210526314
817+
25,0,1.1578947368421053
818+
25,1,1.3684210526315788
819+
25,0,1.5789473684210522
820+
25,0,1.789473684210526
821+
25,1,2
822+
24,0,-2
823+
24,0,-1.7894736842105263
824+
24,0,-1.5789473684210527
825+
24,0,-1.368421052631579
826+
24,0,-1.1578947368421053
827+
24,0,-0.9473684210526316
828+
24,0,-0.736842105263158
829+
24,0,-0.5263157894736843
830+
24,0,-0.3157894736842106
831+
24,0,-0.10526315789473695
832+
24,0,0.10526315789473673
833+
24,0,0.3157894736842106
834+
24,0,0.5263157894736841
835+
24,1,0.7368421052631575
836+
24,0,0.9473684210526314
837+
24,0,1.1578947368421053
838+
24,0,1.3684210526315788
839+
24,1,1.5789473684210522
840+
24,0,1.789473684210526
841+
24,0,2
842+
23,0,-2
843+
23,0,-1.7894736842105263
844+
23,0,-1.5789473684210527
845+
23,0,-1.368421052631579
846+
23,1,-1.1578947368421053
847+
23,0,-0.9473684210526316
848+
23,0,-0.736842105263158
849+
23,0,-0.5263157894736843
850+
23,0,-0.3157894736842106
851+
23,0,-0.10526315789473695
852+
23,0,0.10526315789473673
853+
23,0,0.3157894736842106
854+
23,1,0.5263157894736841
855+
23,0,0.7368421052631575
856+
23,1,0.9473684210526314
857+
23,1,1.1578947368421053
858+
23,0,1.3684210526315788
859+
23,1,1.5789473684210522
860+
23,1,1.789473684210526
861+
23,1,2
862+
22,0,-2
863+
22,0,-1.7894736842105263
864+
22,0,-1.5789473684210527
865+
22,0,-1.368421052631579
866+
22,0,-1.1578947368421053
867+
22,0,-0.9473684210526316
868+
22,0,-0.736842105263158
869+
22,0,-0.5263157894736843
870+
22,0,-0.3157894736842106
871+
22,0,-0.10526315789473695
872+
22,0,0.10526315789473673
873+
22,1,0.3157894736842106
874+
22,0,0.5263157894736841
875+
22,0,0.7368421052631575
876+
22,0,0.9473684210526314
877+
22,0,1.1578947368421053
878+
22,0,1.3684210526315788
879+
22,1,1.5789473684210522
880+
22,1,1.789473684210526
881+
22,1,2
882+
21,0,-2
883+
21,0,-1.7894736842105263
884+
21,0,-1.5789473684210527
885+
21,0,-1.368421052631579
886+
21,0,-1.1578947368421053
887+
21,0,-0.9473684210526316
888+
21,0,-0.736842105263158
889+
21,0,-0.5263157894736843
890+
21,0,-0.3157894736842106
891+
21,0,-0.10526315789473695
892+
21,0,0.10526315789473673
893+
21,0,0.3157894736842106
894+
21,0,0.5263157894736841
895+
21,1,0.7368421052631575
896+
21,1,0.9473684210526314
897+
21,0,1.1578947368421053
898+
21,0,1.3684210526315788
899+
21,0,1.5789473684210522
900+
21,0,1.789473684210526
901+
21,0,2
902+
20,0,-2
903+
20,0,-1.7894736842105263
904+
20,0,-1.5789473684210527
905+
20,0,-1.368421052631579
906+
20,0,-1.1578947368421053
907+
20,0,-0.9473684210526316
908+
20,0,-0.736842105263158
909+
20,0,-0.5263157894736843
910+
20,0,-0.3157894736842106
911+
20,0,-0.10526315789473695
912+
20,0,0.10526315789473673
913+
20,0,0.3157894736842106
914+
20,0,0.5263157894736841
915+
20,0,0.7368421052631575
916+
20,0,0.9473684210526314
917+
20,1,1.1578947368421053
918+
20,0,1.3684210526315788
919+
20,0,1.5789473684210522
920+
20,1,1.789473684210526
921+
20,0,2
922+
19,0,-2
923+
19,0,-1.7894736842105263
924+
19,0,-1.5789473684210527
925+
19,0,-1.368421052631579
926+
19,0,-1.1578947368421053
927+
19,0,-0.9473684210526316
928+
19,0,-0.736842105263158
929+
19,0,-0.5263157894736843
930+
19,0,-0.3157894736842106
931+
19,0,-0.10526315789473695
932+
19,0,0.10526315789473673
933+
19,0,0.3157894736842106
934+
19,0,0.5263157894736841
935+
19,0,0.7368421052631575
936+
19,0,0.9473684210526314
937+
19,0,1.1578947368421053
938+
19,1,1.3684210526315788
939+
19,1,1.5789473684210522
940+
19,0,1.789473684210526
941+
19,0,2
942+
18,0,-2
943+
18,0,-1.7894736842105263
944+
18,0,-1.5789473684210527
945+
18,0,-1.368421052631579
946+
18,0,-1.1578947368421053
947+
18,0,-0.9473684210526316
948+
18,0,-0.736842105263158
949+
18,0,-0.5263157894736843
950+
18,0,-0.3157894736842106
951+
18,0,-0.10526315789473695
952+
18,1,0.10526315789473673
953+
18,0,0.3157894736842106
954+
18,0,0.5263157894736841
955+
18,0,0.7368421052631575
956+
18,0,0.9473684210526314
957+
18,0,1.1578947368421053
958+
18,0,1.3684210526315788
959+
18,0,1.5789473684210522
960+
18,0,1.789473684210526
961+
18,0,2
962+
17,0,-2
963+
17,0,-1.7894736842105263
964+
17,0,-1.5789473684210527
965+
17,0,-1.368421052631579
966+
17,0,-1.1578947368421053
967+
17,0,-0.9473684210526316
968+
17,0,-0.736842105263158
969+
17,0,-0.5263157894736843
970+
17,0,-0.3157894736842106
971+
17,0,-0.10526315789473695
972+
17,0,0.10526315789473673
973+
17,0,0.3157894736842106
974+
17,0,0.5263157894736841
975+
17,0,0.7368421052631575
976+
17,0,0.9473684210526314
977+
17,0,1.1578947368421053
978+
17,0,1.3684210526315788
979+
17,0,1.5789473684210522
980+
17,0,1.789473684210526
981+
17,0,2
982+
16,0,-2
983+
16,0,-1.7894736842105263
984+
16,0,-1.5789473684210527
985+
16,0,-1.368421052631579
986+
16,0,-1.1578947368421053
987+
16,0,-0.9473684210526316
988+
16,0,-0.736842105263158
989+
16,0,-0.5263157894736843
990+
16,0,-0.3157894736842106
991+
16,0,-0.10526315789473695
992+
16,0,0.10526315789473673
993+
16,0,0.3157894736842106
994+
16,0,0.5263157894736841
995+
16,0,0.7368421052631575
996+
16,0,0.9473684210526314
997+
16,0,1.1578947368421053
998+
16,0,1.3684210526315788
999+
16,0,1.5789473684210522
1000+
16,0,1.789473684210526
1001+
16,0,2
1002+
15,0,-2
1003+
15,0,-1.7894736842105263
1004+
15,0,-1.5789473684210527
1005+
15,0,-1.368421052631579
1006+
15,0,-1.1578947368421053
1007+
15,0,-0.9473684210526316
1008+
15,0,-0.736842105263158
1009+
15,0,-0.5263157894736843
1010+
15,0,-0.3157894736842106
1011+
15,0,-0.10526315789473695
1012+
15,0,0.10526315789473673
1013+
15,0,0.3157894736842106
1014+
15,0,0.5263157894736841
1015+
15,0,0.7368421052631575
1016+
15,0,0.9473684210526314
1017+
15,0,1.1578947368421053
1018+
15,0,1.3684210526315788
1019+
15,0,1.5789473684210522
1020+
15,0,1.789473684210526
1021+
15,0,2
1022+
14,0,-2
1023+
14,0,-1.7894736842105263
1024+
14,0,-1.5789473684210527
1025+
14,0,-1.368421052631579
1026+
14,0,-1.1578947368421053
1027+
14,0,-0.9473684210526316
1028+
14,0,-0.736842105263158
1029+
14,0,-0.5263157894736843
1030+
14,0,-0.3157894736842106
1031+
14,0,-0.10526315789473695
1032+
14,0,0.10526315789473673
1033+
14,0,0.3157894736842106
1034+
14,0,0.5263157894736841
1035+
14,0,0.7368421052631575
1036+
14,0,0.9473684210526314
1037+
14,0,1.1578947368421053
1038+
14,0,1.3684210526315788
1039+
14,0,1.5789473684210522
1040+
14,0,1.789473684210526
1041+
14,0,2
1042+
13,0,-2
1043+
13,0,-1.7894736842105263
1044+
13,0,-1.5789473684210527
1045+
13,0,-1.368421052631579
1046+
13,0,-1.1578947368421053
1047+
13,0,-0.9473684210526316
1048+
13,0,-0.736842105263158
1049+
13,0,-0.5263157894736843
1050+
13,0,-0.3157894736842106
1051+
13,0,-0.10526315789473695
1052+
13,0,0.10526315789473673
1053+
13,0,0.3157894736842106
1054+
13,0,0.5263157894736841
1055+
13,0,0.7368421052631575
1056+
13,0,0.9473684210526314
1057+
13,0,1.1578947368421053
1058+
13,0,1.3684210526315788
1059+
13,0,1.5789473684210522
1060+
13,0,1.789473684210526
1061+
13,0,2
1062+
12,0,-2
1063+
12,0,-1.7894736842105263
1064+
12,0,-1.5789473684210527
1065+
12,0,-1.368421052631579
1066+
12,0,-1.1578947368421053
1067+
12,0,-0.9473684210526316
1068+
12,0,-0.736842105263158
1069+
12,0,-0.5263157894736843
1070+
12,0,-0.3157894736842106
1071+
12,0,-0.10526315789473695
1072+
12,0,0.10526315789473673
1073+
12,0,0.3157894736842106
1074+
12,0,0.5263157894736841
1075+
12,0,0.7368421052631575
1076+
12,0,0.9473684210526314
1077+
12,0,1.1578947368421053
1078+
12,0,1.3684210526315788
1079+
12,0,1.5789473684210522
1080+
12,0,1.789473684210526
1081+
12,0,2
1082+
11,0,-2
1083+
11,0,-1.7894736842105263
1084+
11,0,-1.5789473684210527
1085+
11,0,-1.368421052631579
1086+
11,0,-1.1578947368421053
1087+
11,0,-0.9473684210526316
1088+
11,0,-0.736842105263158
1089+
11,0,-0.5263157894736843
1090+
11,0,-0.3157894736842106
1091+
11,0,-0.10526315789473695
1092+
11,0,0.10526315789473673
1093+
11,0,0.3157894736842106
1094+
11,0,0.5263157894736841
1095+
11,0,0.7368421052631575
1096+
11,0,0.9473684210526314
1097+
11,0,1.1578947368421053
1098+
11,0,1.3684210526315788
1099+
11,0,1.5789473684210522
1100+
11,0,1.789473684210526
1101+
11,0,2
1102+
10,0,-2
1103+
10,0,-1.7894736842105263
1104+
10,0,-1.5789473684210527
1105+
10,0,-1.368421052631579
1106+
10,0,-1.1578947368421053
1107+
10,0,-0.9473684210526316
1108+
10,0,-0.736842105263158
1109+
10,0,-0.5263157894736843
1110+
10,0,-0.3157894736842106
1111+
10,0,-0.10526315789473695
1112+
10,0,0.10526315789473673
1113+
10,0,0.3157894736842106
1114+
10,0,0.5263157894736841
1115+
10,0,0.7368421052631575
1116+
10,0,0.9473684210526314
1117+
10,0,1.1578947368421053
1118+
10,0,1.3684210526315788
1119+
10,0,1.5789473684210522
1120+
10,0,1.789473684210526
1121+
10,0,2
1122+
9,0,-2
1123+
9,0,-1.7894736842105263
1124+
9,0,-1.5789473684210527
1125+
9,0,-1.368421052631579
1126+
9,0,-1.1578947368421053
1127+
9,0,-0.9473684210526316
1128+
9,0,-0.736842105263158
1129+
9,0,-0.5263157894736843
1130+
9,0,-0.3157894736842106
1131+
9,0,-0.10526315789473695
1132+
9,0,0.10526315789473673
1133+
9,0,0.3157894736842106
1134+
9,0,0.5263157894736841
1135+
9,0,0.7368421052631575
1136+
9,0,0.9473684210526314
1137+
9,0,1.1578947368421053
1138+
9,0,1.3684210526315788
1139+
9,0,1.5789473684210522
1140+
9,0,1.789473684210526
1141+
9,0,2
1142+
8,0,-2
1143+
8,0,-1.7894736842105263
1144+
8,0,-1.5789473684210527
1145+
8,0,-1.368421052631579
1146+
8,0,-1.1578947368421053
1147+
8,0,-0.9473684210526316
1148+
8,0,-0.736842105263158
1149+
8,0,-0.5263157894736843
1150+
8,0,-0.3157894736842106
1151+
8,0,-0.10526315789473695
1152+
8,0,0.10526315789473673
1153+
8,0,0.3157894736842106
1154+
8,0,0.5263157894736841
1155+
8,0,0.7368421052631575
1156+
8,0,0.9473684210526314
1157+
8,0,1.1578947368421053
1158+
8,0,1.3684210526315788
1159+
8,0,1.5789473684210522
1160+
8,0,1.789473684210526
1161+
8,0,2
1162+
7,0,-2
1163+
7,0,-1.7894736842105263
1164+
7,0,-1.5789473684210527
1165+
7,0,-1.368421052631579
1166+
7,0,-1.1578947368421053
1167+
7,0,-0.9473684210526316
1168+
7,0,-0.736842105263158
1169+
7,0,-0.5263157894736843
1170+
7,0,-0.3157894736842106
1171+
7,0,-0.10526315789473695
1172+
7,0,0.10526315789473673
1173+
7,0,0.3157894736842106
1174+
7,0,0.5263157894736841
1175+
7,0,0.7368421052631575
1176+
7,0,0.9473684210526314
1177+
7,0,1.1578947368421053
1178+
7,0,1.3684210526315788
1179+
7,0,1.5789473684210522
1180+
7,0,1.789473684210526
1181+
7,0,2
1182+
6,0,-2
1183+
6,0,-1.7894736842105263
1184+
6,0,-1.5789473684210527
1185+
6,0,-1.368421052631579
1186+
6,0,-1.1578947368421053
1187+
6,0,-0.9473684210526316
1188+
6,0,-0.736842105263158
1189+
6,0,-0.5263157894736843
1190+
6,0,-0.3157894736842106
1191+
6,0,-0.10526315789473695
1192+
6,0,0.10526315789473673
1193+
6,0,0.3157894736842106
1194+
6,0,0.5263157894736841
1195+
6,0,0.7368421052631575
1196+
6,0,0.9473684210526314
1197+
6,0,1.1578947368421053
1198+
6,0,1.3684210526315788
1199+
6,0,1.5789473684210522
1200+
6,0,1.789473684210526
1201+
6,0,2
1202+
5,0,-2
1203+
5,0,-1.7894736842105263
1204+
5,0,-1.5789473684210527
1205+
5,0,-1.368421052631579
1206+
5,0,-1.1578947368421053
1207+
5,0,-0.9473684210526316
1208+
5,0,-0.736842105263158
1209+
5,0,-0.5263157894736843
1210+
5,0,-0.3157894736842106
1211+
5,0,-0.10526315789473695
1212+
5,0,0.10526315789473673
1213+
5,0,0.3157894736842106
1214+
5,0,0.5263157894736841
1215+
5,0,0.7368421052631575
1216+
5,0,0.9473684210526314
1217+
5,0,1.1578947368421053
1218+
5,0,1.3684210526315788
1219+
5,0,1.5789473684210522
1220+
5,0,1.789473684210526
1221+
5,0,2
1222+
4,0,-2
1223+
4,0,-1.7894736842105263
1224+
4,0,-1.5789473684210527
1225+
4,0,-1.368421052631579
1226+
4,0,-1.1578947368421053
1227+
4,0,-0.9473684210526316
1228+
4,0,-0.736842105263158
1229+
4,0,-0.5263157894736843
1230+
4,0,-0.3157894736842106
1231+
4,0,-0.10526315789473695
1232+
4,0,0.10526315789473673
1233+
4,0,0.3157894736842106
1234+
4,0,0.5263157894736841
1235+
4,0,0.7368421052631575
1236+
4,0,0.9473684210526314
1237+
4,0,1.1578947368421053
1238+
4,0,1.3684210526315788
1239+
4,0,1.5789473684210522
1240+
4,0,1.789473684210526
1241+
4,0,2
1242+
3,0,-2
1243+
3,0,-1.7894736842105263
1244+
3,0,-1.5789473684210527
1245+
3,0,-1.368421052631579
1246+
3,0,-1.1578947368421053
1247+
3,0,-0.9473684210526316
1248+
3,0,-0.736842105263158
1249+
3,0,-0.5263157894736843
1250+
3,0,-0.3157894736842106
1251+
3,0,-0.10526315789473695
1252+
3,0,0.10526315789473673
1253+
3,0,0.3157894736842106
1254+
3,0,0.5263157894736841
1255+
3,0,0.7368421052631575
1256+
3,0,0.9473684210526314
1257+
3,0,1.1578947368421053
1258+
3,0,1.3684210526315788
1259+
3,0,1.5789473684210522
1260+
3,0,1.789473684210526
1261+
3,0,2
1262+
2,0,-2
1263+
2,0,-1.7894736842105263
1264+
2,0,-1.5789473684210527
1265+
2,0,-1.368421052631579
1266+
2,0,-1.1578947368421053
1267+
2,0,-0.9473684210526316
1268+
2,0,-0.736842105263158
1269+
2,0,-0.5263157894736843
1270+
2,0,-0.3157894736842106
1271+
2,0,-0.10526315789473695
1272+
2,0,0.10526315789473673
1273+
2,0,0.3157894736842106
1274+
2,0,0.5263157894736841
1275+
2,0,0.7368421052631575
1276+
2,0,0.9473684210526314
1277+
2,0,1.1578947368421053
1278+
2,0,1.3684210526315788
1279+
2,0,1.5789473684210522
1280+
2,0,1.789473684210526
1281+
2,0,2
1282+
1,0,-2
1283+
1,0,-1.7894736842105263
1284+
1,0,-1.5789473684210527
1285+
1,0,-1.368421052631579
1286+
1,0,-1.1578947368421053
1287+
1,0,-0.9473684210526316
1288+
1,0,-0.736842105263158
1289+
1,0,-0.5263157894736843
1290+
1,0,-0.3157894736842106
1291+
1,0,-0.10526315789473695
1292+
1,0,0.10526315789473673
1293+
1,0,0.3157894736842106
1294+
1,0,0.5263157894736841
1295+
1,0,0.7368421052631575
1296+
1,0,0.9473684210526314
1297+
1,0,1.1578947368421053
1298+
1,0,1.3684210526315788
1299+
1,0,1.5789473684210522
1300+
1,0,1.789473684210526
1301+
1,0,2

‎week4/swapnil_solutions.ipynb

+304-271
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"numpyro.set_platform(\"cpu\")\n",
2727
"numpyro.set_host_device_count(4)\n",
2828
"rng_key = random.PRNGKey(0)\n",
29-
"%config InlineBackend.figure_format ='retina'"
29+
"%config InlineBackend.figure_format ='retina'\n",
30+
"from causalgraphicalmodels import CausalGraphicalModel"
3031
]
3132
},
3233
{
@@ -272,12 +273,302 @@
272273
},
273274
{
274275
"cell_type": "code",
275-
"execution_count": null,
276+
"execution_count": 5,
276277
"id": "c43e55ab-abba-438a-89c1-29f611251244",
277278
"metadata": {},
279+
"outputs": [
280+
{
281+
"data": {
282+
"image/svg+xml": [
283+
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
284+
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
285+
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
286+
"<!-- Generated by graphviz version 2.49.0 (20210828.1703)\n",
287+
" -->\n",
288+
"<!-- Pages: 1 -->\n",
289+
"<svg width=\"174pt\" height=\"116pt\"\n",
290+
" viewBox=\"0.00 0.00 173.80 116.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
291+
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 112)\">\n",
292+
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-112 169.8,-112 169.8,4 -4,4\"/>\n",
293+
"<!-- happiness -->\n",
294+
"<g id=\"node1\" class=\"node\">\n",
295+
"<title>happiness</title>\n",
296+
"<ellipse fill=\"none\" stroke=\"black\" cx=\"46.8\" cy=\"-90\" rx=\"46.59\" ry=\"18\"/>\n",
297+
"<text text-anchor=\"middle\" x=\"46.8\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\">happiness</text>\n",
298+
"</g>\n",
299+
"<!-- marriage -->\n",
300+
"<g id=\"node2\" class=\"node\">\n",
301+
"<title>marriage</title>\n",
302+
"<ellipse fill=\"none\" stroke=\"black\" cx=\"92.8\" cy=\"-18\" rx=\"42.79\" ry=\"18\"/>\n",
303+
"<text text-anchor=\"middle\" x=\"92.8\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">marriage</text>\n",
304+
"</g>\n",
305+
"<!-- happiness&#45;&gt;marriage -->\n",
306+
"<g id=\"edge1\" class=\"edge\">\n",
307+
"<title>happiness&#45;&gt;marriage</title>\n",
308+
"<path fill=\"none\" stroke=\"black\" d=\"M57.7,-72.41C63.25,-63.95 70.13,-53.49 76.32,-44.08\"/>\n",
309+
"<polygon fill=\"black\" stroke=\"black\" points=\"79.41,-45.75 81.97,-35.47 73.56,-41.9 79.41,-45.75\"/>\n",
310+
"</g>\n",
311+
"<!-- age -->\n",
312+
"<g id=\"node3\" class=\"node\">\n",
313+
"<title>age</title>\n",
314+
"<ellipse fill=\"none\" stroke=\"black\" cx=\"138.8\" cy=\"-90\" rx=\"27\" ry=\"18\"/>\n",
315+
"<text text-anchor=\"middle\" x=\"138.8\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\">age</text>\n",
316+
"</g>\n",
317+
"<!-- age&#45;&gt;marriage -->\n",
318+
"<g id=\"edge2\" class=\"edge\">\n",
319+
"<title>age&#45;&gt;marriage</title>\n",
320+
"<path fill=\"none\" stroke=\"black\" d=\"M128.36,-73.12C122.76,-64.59 115.72,-53.89 109.39,-44.25\"/>\n",
321+
"<polygon fill=\"black\" stroke=\"black\" points=\"112.25,-42.23 103.83,-35.8 106.4,-46.08 112.25,-42.23\"/>\n",
322+
"</g>\n",
323+
"</g>\n",
324+
"</svg>\n"
325+
],
326+
"text/plain": [
327+
"<graphviz.dot.Digraph at 0x7f83883cc6a0>"
328+
]
329+
},
330+
"execution_count": 5,
331+
"metadata": {},
332+
"output_type": "execute_result"
333+
}
334+
],
335+
"source": [
336+
"happiness = CausalGraphicalModel(\n",
337+
" nodes=[\"happiness\", \"marriage\", \"age\"],\n",
338+
" edges=[\n",
339+
" (\"happiness\", \"marriage\"), \n",
340+
" (\"age\", \"marriage\")\n",
341+
" ]\n",
342+
")\n",
343+
"happiness.draw()"
344+
]
345+
},
346+
{
347+
"cell_type": "markdown",
348+
"id": "80322ad5-1849-4665-9bbe-eb7072b31fb4",
349+
"metadata": {},
350+
"source": [
351+
"I have ended up getting data from R package and saving it in the data folder; reading it now and performing the edits done in the code from book"
352+
]
353+
},
354+
{
355+
"cell_type": "code",
356+
"execution_count": 6,
357+
"id": "9676a1a8-960b-4bc8-a85e-dbfd1ede0097",
358+
"metadata": {},
359+
"outputs": [
360+
{
361+
"name": "stdout",
362+
"output_type": "stream",
363+
"text": [
364+
" age married happiness\n",
365+
"count 1300.000000 1300.000000 1.300000e+03\n",
366+
"mean 33.000000 0.300769 -9.018427e-17\n",
367+
"std 18.768883 0.458769 1.214421e+00\n",
368+
"min 1.000000 0.000000 -2.000000e+00\n",
369+
"25% 17.000000 0.000000 -1.000000e+00\n",
370+
"50% 33.000000 0.000000 -1.110223e-16\n",
371+
"75% 49.000000 1.000000 1.000000e+00\n",
372+
"max 65.000000 1.000000 2.000000e+00\n",
373+
" age married happiness modified_age\n",
374+
"count 960.00000 960.000000 9.600000e+02 960.000000\n",
375+
"mean 41.50000 0.407292 -8.881784e-17 0.500000\n",
376+
"std 13.86062 0.491586 1.214587e+00 0.294907\n",
377+
"min 18.00000 0.000000 -2.000000e+00 0.000000\n",
378+
"25% 29.75000 0.000000 -1.000000e+00 0.250000\n",
379+
"50% 41.50000 0.000000 -1.110223e-16 0.500000\n",
380+
"75% 53.25000 1.000000 1.000000e+00 0.750000\n",
381+
"max 65.00000 1.000000 2.000000e+00 1.000000\n"
382+
]
383+
}
384+
],
385+
"source": [
386+
"df_data = pd.read_csv(\"../data/happiness.csv\")\n",
387+
"print(df_data.describe())\n",
388+
"df_data = df_data[df_data.age>17] # getting adults\n",
389+
"df_data = df_data.assign(modified_age = (df_data.age - 18)/(65-18))\n",
390+
"print(df_data.describe())"
391+
]
392+
},
393+
{
394+
"cell_type": "code",
395+
"execution_count": 7,
396+
"id": "ce5f937e-935c-479d-8337-58d802a3ab08",
397+
"metadata": {},
278398
"outputs": [],
279399
"source": [
280-
"## Need to do this but it is basically same as question 3, I was just lazy"
400+
"def model6_9(age, married, happiness=None):\n",
401+
" n = len(set(married))\n",
402+
" alpha = numpyro.sample(\"alpha\", dist.Normal(0,1), sample_shape=(n,))\n",
403+
" beta = numpyro.sample(\"beta\", dist.Normal(0, 2))\n",
404+
" sigma = numpyro.sample(\"sigma\", dist.Exponential(1))\n",
405+
" mu = numpyro.deterministic('mu', alpha[married] + beta * age)\n",
406+
" numpyro.sample(\"happiness\", dist.Normal(mu, sigma), obs=happiness)\n",
407+
"def model6_10(age, happiness=None):\n",
408+
" alpha = numpyro.sample(\"alpha\", dist.Normal(0,1))\n",
409+
" beta = numpyro.sample(\"beta\", dist.Normal(0, 2))\n",
410+
" sigma = numpyro.sample(\"sigma\", dist.Exponential(1))\n",
411+
" mu = numpyro.deterministic('mu', alpha + beta * age)\n",
412+
" numpyro.sample(\"happiness\", dist.Normal(mu, sigma), obs=happiness)"
413+
]
414+
},
415+
{
416+
"cell_type": "code",
417+
"execution_count": 8,
418+
"id": "354c7223-00dc-4332-acee-dd6f120b2ba7",
419+
"metadata": {},
420+
"outputs": [
421+
{
422+
"name": "stdout",
423+
"output_type": "stream",
424+
"text": [
425+
"\n",
426+
" mean std median 5.0% 95.0% n_eff r_hat\n",
427+
" alpha[0] -0.24 0.06 -0.24 -0.33 -0.12 2601.73 1.00\n",
428+
" alpha[1] 1.26 0.09 1.26 1.12 1.39 2582.98 1.00\n",
429+
" beta -0.75 0.11 -0.75 -0.93 -0.56 2264.58 1.00\n",
430+
" sigma 0.99 0.02 0.99 0.96 1.03 4972.01 1.00\n",
431+
"\n",
432+
"Number of divergences: 0\n"
433+
]
434+
}
435+
],
436+
"source": [
437+
"kernel6_9 = NUTS(model6_9)\n",
438+
"m6_9 = MCMC(kernel6_9, num_warmup=1000, num_samples=2000,num_chains=4,progress_bar=False)\n",
439+
"m6_9.run(rng_key, age = df_data.modified_age.values, married = df_data.married.values, happiness=df_data.happiness.values)\n",
440+
"m6_9.print_summary()"
441+
]
442+
},
443+
{
444+
"cell_type": "code",
445+
"execution_count": 9,
446+
"id": "1833082a-a33d-4d3c-8750-de4226067156",
447+
"metadata": {},
448+
"outputs": [
449+
{
450+
"name": "stdout",
451+
"output_type": "stream",
452+
"text": [
453+
"\n",
454+
" mean std median 5.0% 95.0% n_eff r_hat\n",
455+
" alpha -0.00 0.08 -0.00 -0.13 0.13 2429.78 1.00\n",
456+
" beta 0.00 0.13 0.00 -0.23 0.21 2489.96 1.00\n",
457+
" sigma 1.22 0.03 1.22 1.17 1.26 4679.18 1.00\n",
458+
"\n",
459+
"Number of divergences: 0\n"
460+
]
461+
}
462+
],
463+
"source": [
464+
"kernel6_10 = NUTS(model6_10)\n",
465+
"m6_10 = MCMC(kernel6_10, num_warmup=1000, num_samples=2000,num_chains=4,progress_bar=False)\n",
466+
"m6_10.run(rng_key, age = df_data.modified_age.values, happiness=df_data.happiness.values)\n",
467+
"m6_10.print_summary()"
468+
]
469+
},
470+
{
471+
"cell_type": "code",
472+
"execution_count": 10,
473+
"id": "e2dbec43-6695-434d-98f8-00ef6ff1d9b0",
474+
"metadata": {},
475+
"outputs": [
476+
{
477+
"name": "stderr",
478+
"output_type": "stream",
479+
"text": [
480+
"/Users/smishra/anaconda3/envs/statrethinking/lib/python3.8/site-packages/arviz/stats/stats.py:145: UserWarning: The default method used to estimate the weights for each model,has changed from BB-pseudo-BMA to stacking\n",
481+
" warnings.warn(\n"
482+
]
483+
},
484+
{
485+
"data": {
486+
"text/html": [
487+
"<div>\n",
488+
"<style scoped>\n",
489+
" .dataframe tbody tr th:only-of-type {\n",
490+
" vertical-align: middle;\n",
491+
" }\n",
492+
"\n",
493+
" .dataframe tbody tr th {\n",
494+
" vertical-align: top;\n",
495+
" }\n",
496+
"\n",
497+
" .dataframe thead th {\n",
498+
" text-align: right;\n",
499+
" }\n",
500+
"</style>\n",
501+
"<table border=\"1\" class=\"dataframe\">\n",
502+
" <thead>\n",
503+
" <tr style=\"text-align: right;\">\n",
504+
" <th></th>\n",
505+
" <th>rank</th>\n",
506+
" <th>loo</th>\n",
507+
" <th>p_loo</th>\n",
508+
" <th>d_loo</th>\n",
509+
" <th>weight</th>\n",
510+
" <th>se</th>\n",
511+
" <th>dse</th>\n",
512+
" <th>warning</th>\n",
513+
" <th>loo_scale</th>\n",
514+
" </tr>\n",
515+
" </thead>\n",
516+
" <tbody>\n",
517+
" <tr>\n",
518+
" <th>model6_9</th>\n",
519+
" <td>0</td>\n",
520+
" <td>2713.805210</td>\n",
521+
" <td>3.630965</td>\n",
522+
" <td>0.000000</td>\n",
523+
" <td>0.992348</td>\n",
524+
" <td>37.316992</td>\n",
525+
" <td>0.000000</td>\n",
526+
" <td>False</td>\n",
527+
" <td>deviance</td>\n",
528+
" </tr>\n",
529+
" <tr>\n",
530+
" <th>model6_10</th>\n",
531+
" <td>1</td>\n",
532+
" <td>3101.917234</td>\n",
533+
" <td>2.347816</td>\n",
534+
" <td>388.112024</td>\n",
535+
" <td>0.007652</td>\n",
536+
" <td>27.633863</td>\n",
537+
" <td>35.168188</td>\n",
538+
" <td>False</td>\n",
539+
" <td>deviance</td>\n",
540+
" </tr>\n",
541+
" </tbody>\n",
542+
"</table>\n",
543+
"</div>"
544+
],
545+
"text/plain": [
546+
" rank loo p_loo d_loo weight se \\\n",
547+
"model6_9 0 2713.805210 3.630965 0.000000 0.992348 37.316992 \n",
548+
"model6_10 1 3101.917234 2.347816 388.112024 0.007652 27.633863 \n",
549+
"\n",
550+
" dse warning loo_scale \n",
551+
"model6_9 0.000000 False deviance \n",
552+
"model6_10 35.168188 False deviance "
553+
]
554+
},
555+
"execution_count": 10,
556+
"metadata": {},
557+
"output_type": "execute_result"
558+
}
559+
],
560+
"source": [
561+
"az.compare({'model6_9': m6_9,\n",
562+
" 'model6_10': m6_10},\n",
563+
" scale='deviance')"
564+
]
565+
},
566+
{
567+
"cell_type": "markdown",
568+
"id": "d56c6f96-6536-46c7-b9ce-4a4b2b5660cf",
569+
"metadata": {},
570+
"source": [
571+
"Basically we have model with wrong causal inference doing better prediction, it is expected here if you look at causal graph knowing marriage is useful for predicting happiness but that doesn't give us right causal effect for age. To get causal effect of age if we condition on marriage in our model then path gets openend up as it is a collider."
281572
]
282573
},
283574
{
@@ -306,7 +597,7 @@
306597
},
307598
{
308599
"cell_type": "code",
309-
"execution_count": 5,
600+
"execution_count": 11,
310601
"id": "42109e8b-c090-420e-ac1b-78e41d822754",
311602
"metadata": {},
312603
"outputs": [
@@ -449,7 +740,7 @@
449740
"[116 rows x 5 columns]"
450741
]
451742
},
452-
"execution_count": 5,
743+
"execution_count": 11,
453744
"metadata": {},
454745
"output_type": "execute_result"
455746
}
@@ -462,7 +753,7 @@
462753
},
463754
{
464755
"cell_type": "code",
465-
"execution_count": 6,
756+
"execution_count": 12,
466757
"id": "eaaf5ffa-9b31-4907-8f7f-f219dedd66dc",
467758
"metadata": {},
468759
"outputs": [],
@@ -476,7 +767,7 @@
476767
},
477768
{
478769
"cell_type": "code",
479-
"execution_count": 7,
770+
"execution_count": 13,
480771
"id": "2cea24ad-56f1-4808-9522-f2a32af41cfa",
481772
"metadata": {},
482773
"outputs": [],
@@ -493,7 +784,7 @@
493784
},
494785
{
495786
"cell_type": "code",
496-
"execution_count": 8,
787+
"execution_count": 14,
497788
"id": "9a72845c-7ab0-489b-a8b3-07e5982883f3",
498789
"metadata": {},
499790
"outputs": [],
@@ -509,7 +800,7 @@
509800
},
510801
{
511802
"cell_type": "code",
512-
"execution_count": 9,
803+
"execution_count": null,
513804
"id": "a0972129-cebf-48e3-93e3-f26271bce63a",
514805
"metadata": {},
515806
"outputs": [],
@@ -523,136 +814,10 @@
523814
},
524815
{
525816
"cell_type": "code",
526-
"execution_count": 10,
817+
"execution_count": null,
527818
"id": "41d601cb-18d5-4f57-b9bd-b0c150f96bdf",
528819
"metadata": {},
529-
"outputs": [
530-
{
531-
"name": "stderr",
532-
"output_type": "stream",
533-
"text": [
534-
"/Users/smishra/anaconda3/envs/statrethinking/lib/python3.8/site-packages/arviz/stats/stats.py:145: UserWarning: The default method used to estimate the weights for each model,has changed from BB-pseudo-BMA to stacking\n",
535-
" warnings.warn(\n"
536-
]
537-
},
538-
{
539-
"data": {
540-
"text/html": [
541-
"<div>\n",
542-
"<style scoped>\n",
543-
" .dataframe tbody tr th:only-of-type {\n",
544-
" vertical-align: middle;\n",
545-
" }\n",
546-
"\n",
547-
" .dataframe tbody tr th {\n",
548-
" vertical-align: top;\n",
549-
" }\n",
550-
"\n",
551-
" .dataframe thead th {\n",
552-
" text-align: right;\n",
553-
" }\n",
554-
"</style>\n",
555-
"<table border=\"1\" class=\"dataframe\">\n",
556-
" <thead>\n",
557-
" <tr style=\"text-align: right;\">\n",
558-
" <th></th>\n",
559-
" <th>rank</th>\n",
560-
" <th>loo</th>\n",
561-
" <th>p_loo</th>\n",
562-
" <th>d_loo</th>\n",
563-
" <th>weight</th>\n",
564-
" <th>se</th>\n",
565-
" <th>dse</th>\n",
566-
" <th>warning</th>\n",
567-
" <th>loo_scale</th>\n",
568-
" </tr>\n",
569-
" </thead>\n",
570-
" <tbody>\n",
571-
" <tr>\n",
572-
" <th>model_1</th>\n",
573-
" <td>0</td>\n",
574-
" <td>323.074635</td>\n",
575-
" <td>4.573192</td>\n",
576-
" <td>0.000000</td>\n",
577-
" <td>0.000000e+00</td>\n",
578-
" <td>15.423072</td>\n",
579-
" <td>0.000000</td>\n",
580-
" <td>False</td>\n",
581-
" <td>deviance</td>\n",
582-
" </tr>\n",
583-
" <tr>\n",
584-
" <th>model_2</th>\n",
585-
" <td>1</td>\n",
586-
" <td>323.809874</td>\n",
587-
" <td>3.549632</td>\n",
588-
" <td>0.735239</td>\n",
589-
" <td>5.159885e-01</td>\n",
590-
" <td>15.312352</td>\n",
591-
" <td>3.318355</td>\n",
592-
" <td>False</td>\n",
593-
" <td>deviance</td>\n",
594-
" </tr>\n",
595-
" <tr>\n",
596-
" <th>model_3</th>\n",
597-
" <td>2</td>\n",
598-
" <td>323.918053</td>\n",
599-
" <td>3.617398</td>\n",
600-
" <td>0.843418</td>\n",
601-
" <td>4.840115e-01</td>\n",
602-
" <td>15.053828</td>\n",
603-
" <td>2.746391</td>\n",
604-
" <td>False</td>\n",
605-
" <td>deviance</td>\n",
606-
" </tr>\n",
607-
" <tr>\n",
608-
" <th>model_4</th>\n",
609-
" <td>3</td>\n",
610-
" <td>333.474670</td>\n",
611-
" <td>2.378504</td>\n",
612-
" <td>10.400036</td>\n",
613-
" <td>7.224393e-17</td>\n",
614-
" <td>13.322216</td>\n",
615-
" <td>6.708518</td>\n",
616-
" <td>False</td>\n",
617-
" <td>deviance</td>\n",
618-
" </tr>\n",
619-
" <tr>\n",
620-
" <th>model_5</th>\n",
621-
" <td>4</td>\n",
622-
" <td>333.736473</td>\n",
623-
" <td>2.591651</td>\n",
624-
" <td>10.661839</td>\n",
625-
" <td>0.000000e+00</td>\n",
626-
" <td>13.301584</td>\n",
627-
" <td>6.765851</td>\n",
628-
" <td>False</td>\n",
629-
" <td>deviance</td>\n",
630-
" </tr>\n",
631-
" </tbody>\n",
632-
"</table>\n",
633-
"</div>"
634-
],
635-
"text/plain": [
636-
" rank loo p_loo d_loo weight se \\\n",
637-
"model_1 0 323.074635 4.573192 0.000000 0.000000e+00 15.423072 \n",
638-
"model_2 1 323.809874 3.549632 0.735239 5.159885e-01 15.312352 \n",
639-
"model_3 2 323.918053 3.617398 0.843418 4.840115e-01 15.053828 \n",
640-
"model_4 3 333.474670 2.378504 10.400036 7.224393e-17 13.322216 \n",
641-
"model_5 4 333.736473 2.591651 10.661839 0.000000e+00 13.301584 \n",
642-
"\n",
643-
" dse warning loo_scale \n",
644-
"model_1 0.000000 False deviance \n",
645-
"model_2 3.318355 False deviance \n",
646-
"model_3 2.746391 False deviance \n",
647-
"model_4 6.708518 False deviance \n",
648-
"model_5 6.765851 False deviance "
649-
]
650-
},
651-
"execution_count": 10,
652-
"metadata": {},
653-
"output_type": "execute_result"
654-
}
655-
],
820+
"outputs": [],
656821
"source": [
657822
"az.compare({'model_1': m1,\n",
658823
" 'model_2': m2,\n",
@@ -663,142 +828,10 @@
663828
},
664829
{
665830
"cell_type": "code",
666-
"execution_count": 11,
831+
"execution_count": null,
667832
"id": "1e6a1631-a6fb-4add-b264-347a63b1c8ee",
668833
"metadata": {},
669-
"outputs": [
670-
{
671-
"name": "stderr",
672-
"output_type": "stream",
673-
"text": [
674-
"/Users/smishra/anaconda3/envs/statrethinking/lib/python3.8/site-packages/arviz/stats/stats.py:145: UserWarning: The default method used to estimate the weights for each model,has changed from BB-pseudo-BMA to stacking\n",
675-
" warnings.warn(\n",
676-
"/Users/smishra/anaconda3/envs/statrethinking/lib/python3.8/site-packages/arviz/stats/stats.py:1405: UserWarning: For one or more samples the posterior variance of the log predictive densities exceeds 0.4. This could be indication of WAIC starting to fail. \n",
677-
"See http://arxiv.org/abs/1507.04544 for details\n",
678-
" warnings.warn(\n",
679-
"/Users/smishra/anaconda3/envs/statrethinking/lib/python3.8/site-packages/arviz/stats/stats.py:1405: UserWarning: For one or more samples the posterior variance of the log predictive densities exceeds 0.4. This could be indication of WAIC starting to fail. \n",
680-
"See http://arxiv.org/abs/1507.04544 for details\n",
681-
" warnings.warn(\n"
682-
]
683-
},
684-
{
685-
"data": {
686-
"text/html": [
687-
"<div>\n",
688-
"<style scoped>\n",
689-
" .dataframe tbody tr th:only-of-type {\n",
690-
" vertical-align: middle;\n",
691-
" }\n",
692-
"\n",
693-
" .dataframe tbody tr th {\n",
694-
" vertical-align: top;\n",
695-
" }\n",
696-
"\n",
697-
" .dataframe thead th {\n",
698-
" text-align: right;\n",
699-
" }\n",
700-
"</style>\n",
701-
"<table border=\"1\" class=\"dataframe\">\n",
702-
" <thead>\n",
703-
" <tr style=\"text-align: right;\">\n",
704-
" <th></th>\n",
705-
" <th>rank</th>\n",
706-
" <th>waic</th>\n",
707-
" <th>p_waic</th>\n",
708-
" <th>d_waic</th>\n",
709-
" <th>weight</th>\n",
710-
" <th>se</th>\n",
711-
" <th>dse</th>\n",
712-
" <th>warning</th>\n",
713-
" <th>waic_scale</th>\n",
714-
" </tr>\n",
715-
" </thead>\n",
716-
" <tbody>\n",
717-
" <tr>\n",
718-
" <th>model_1</th>\n",
719-
" <td>0</td>\n",
720-
" <td>323.032925</td>\n",
721-
" <td>4.552338</td>\n",
722-
" <td>0.000000</td>\n",
723-
" <td>0.000000</td>\n",
724-
" <td>15.411660</td>\n",
725-
" <td>0.000000</td>\n",
726-
" <td>True</td>\n",
727-
" <td>deviance</td>\n",
728-
" </tr>\n",
729-
" <tr>\n",
730-
" <th>model_2</th>\n",
731-
" <td>1</td>\n",
732-
" <td>323.797792</td>\n",
733-
" <td>3.543591</td>\n",
734-
" <td>0.764867</td>\n",
735-
" <td>0.515471</td>\n",
736-
" <td>15.309769</td>\n",
737-
" <td>3.316102</td>\n",
738-
" <td>False</td>\n",
739-
" <td>deviance</td>\n",
740-
" </tr>\n",
741-
" <tr>\n",
742-
" <th>model_3</th>\n",
743-
" <td>2</td>\n",
744-
" <td>323.898752</td>\n",
745-
" <td>3.607748</td>\n",
746-
" <td>0.865827</td>\n",
747-
" <td>0.484529</td>\n",
748-
" <td>15.047948</td>\n",
749-
" <td>2.742928</td>\n",
750-
" <td>True</td>\n",
751-
" <td>deviance</td>\n",
752-
" </tr>\n",
753-
" <tr>\n",
754-
" <th>model_4</th>\n",
755-
" <td>3</td>\n",
756-
" <td>333.469308</td>\n",
757-
" <td>2.375823</td>\n",
758-
" <td>10.436383</td>\n",
759-
" <td>0.000000</td>\n",
760-
" <td>13.321288</td>\n",
761-
" <td>6.698681</td>\n",
762-
" <td>False</td>\n",
763-
" <td>deviance</td>\n",
764-
" </tr>\n",
765-
" <tr>\n",
766-
" <th>model_5</th>\n",
767-
" <td>4</td>\n",
768-
" <td>333.728666</td>\n",
769-
" <td>2.587748</td>\n",
770-
" <td>10.695741</td>\n",
771-
" <td>0.000000</td>\n",
772-
" <td>13.299985</td>\n",
773-
" <td>6.755876</td>\n",
774-
" <td>False</td>\n",
775-
" <td>deviance</td>\n",
776-
" </tr>\n",
777-
" </tbody>\n",
778-
"</table>\n",
779-
"</div>"
780-
],
781-
"text/plain": [
782-
" rank waic p_waic d_waic weight se dse \\\n",
783-
"model_1 0 323.032925 4.552338 0.000000 0.000000 15.411660 0.000000 \n",
784-
"model_2 1 323.797792 3.543591 0.764867 0.515471 15.309769 3.316102 \n",
785-
"model_3 2 323.898752 3.607748 0.865827 0.484529 15.047948 2.742928 \n",
786-
"model_4 3 333.469308 2.375823 10.436383 0.000000 13.321288 6.698681 \n",
787-
"model_5 4 333.728666 2.587748 10.695741 0.000000 13.299985 6.755876 \n",
788-
"\n",
789-
" warning waic_scale \n",
790-
"model_1 True deviance \n",
791-
"model_2 False deviance \n",
792-
"model_3 True deviance \n",
793-
"model_4 False deviance \n",
794-
"model_5 False deviance "
795-
]
796-
},
797-
"execution_count": 11,
798-
"metadata": {},
799-
"output_type": "execute_result"
800-
}
801-
],
834+
"outputs": [],
802835
"source": [
803836
"az.compare({'model_1': m1,\n",
804837
" 'model_2': m2,\n",

0 commit comments

Comments
 (0)
Please sign in to comment.