Skip to content

Reproduce Nabiximols case study #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Reproduce Nabiximols case study #298

wants to merge 3 commits into from

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented May 15, 2025


##

id = [1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 13, 14, 15, 16, 16, 17, 18, 18, 18, 18, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 27, 27, 28, 28, 28, 28, 29, 30, 30, 30, 30, 31, 31, 32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 35, 35, 36, 36, 37, 37, 37, 37, 38, 39, 39, 39, 39, 40, 40, 40, 41, 42, 42, 42, 42, 43, 43, 43, 43, 44, 44, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47, 48, 48, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 55, 55, 55, 55, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 60, 61, 61, 61, 62, 63, 63, 64, 64, 64, 65, 65, 65, 65, 66, 66, 66, 66, 67, 67, 67, 67, 68, 68, 68, 69, 69, 69, 69, 70, 70, 70, 70, 71, 71, 71, 71, 72, 73, 73, 73, 73, 74, 74, 74, 75, 76, 76, 76, 76, 77, 77, 77, 77, 78, 78, 78, 79, 79, 79, 79, 80, 80, 80, 80, 81, 81, 81, 81, 82, 82, 83, 83, 84, 84, 84, 85, 85, 85, 86, 86, 86, 86, 87, 87, 87, 87, 88, 88, 88, 88, 89, 89, 89, 89, 90, 90, 90, 90, 91, 91, 91, 91, 92, 92, 92, 92, 93, 93, 93, 93, 94, 94, 94, 94, 95, 95, 95, 95, 96, 96, 96, 96, 97, 97, 97, 98, 98, 98, 98, 99, 99, 99, 99, 100, 101, 101, 101, 102, 102, 102, 102, 103, 103, 103, 103, 104, 104, 105, 105, 105, 105, 106, 106, 106, 106, 107, 107, 107, 107, 108, 108, 108, 108, 109, 109, 109, 109, 110, 110, 111, 111, 112, 112, 112, 112, 113, 113, 113, 113, 114, 115, 115, 115, 115, 116, 116, 116, 116, 117, 117, 117, 117, 118, 118, 119, 119, 119, 119, 120, 120, 120, 120, 121, 121, 121, 122, 123, 123, 123, 123, 124, 124, 124, 125, 125, 125, 125, 126, 126, 126, 126, 127, 127, 128]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
id = [1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 13, 14, 15, 16, 16, 17, 18, 18, 18, 18, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 27, 27, 28, 28, 28, 28, 29, 30, 30, 30, 30, 31, 31, 32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 35, 35, 36, 36, 37, 37, 37, 37, 38, 39, 39, 39, 39, 40, 40, 40, 41, 42, 42, 42, 42, 43, 43, 43, 43, 44, 44, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47, 48, 48, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 55, 55, 55, 55, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 60, 61, 61, 61, 62, 63, 63, 64, 64, 64, 65, 65, 65, 65, 66, 66, 66, 66, 67, 67, 67, 67, 68, 68, 68, 69, 69, 69, 69, 70, 70, 70, 70, 71, 71, 71, 71, 72, 73, 73, 73, 73, 74, 74, 74, 75, 76, 76, 76, 76, 77, 77, 77, 77, 78, 78, 78, 79, 79, 79, 79, 80, 80, 80, 80, 81, 81, 81, 81, 82, 82, 83, 83, 84, 84, 84, 85, 85, 85, 86, 86, 86, 86, 87, 87, 87, 87, 88, 88, 88, 88, 89, 89, 89, 89, 90, 90, 90, 90, 91, 91, 91, 91, 92, 92, 92, 92, 93, 93, 93, 93, 94, 94, 94, 94, 95, 95, 95, 95, 96, 96, 96, 96, 97, 97, 97, 98, 98, 98, 98, 99, 99, 99, 99, 100, 101, 101, 101, 102, 102, 102, 102, 103, 103, 103, 103, 104, 104, 105, 105, 105, 105, 106, 106, 106, 106, 107, 107, 107, 107, 108, 108, 108, 108, 109, 109, 109, 109, 110, 110, 111, 111, 112, 112, 112, 112, 113, 113, 113, 113, 114, 115, 115, 115, 115, 116, 116, 116, 116, 117, 117, 117, 117, 118, 118, 119, 119, 119, 119, 120, 120, 120, 120, 121, 121, 121, 122, 123, 123, 123, 123, 124, 124, 124, 125, 125, 125, 125, 126, 126, 126, 126, 127, 127, 128]
id = [
1,
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4,
5,
5,
6,
6,
6,
6,
7,
7,
8,
8,
8,
8,
9,
9,
9,
10,
10,
10,
10,
11,
11,
11,
12,
12,
13,
14,
15,
16,
16,
17,
18,
18,
18,
18,
19,
20,
20,
20,
20,
21,
21,
21,
21,
22,
22,
23,
23,
23,
24,
24,
24,
24,
25,
25,
25,
25,
26,
27,
27,
28,
28,
28,
28,
29,
30,
30,
30,
30,
31,
31,
32,
32,
32,
32,
33,
33,
33,
34,
34,
34,
35,
35,
36,
36,
37,
37,
37,
37,
38,
39,
39,
39,
39,
40,
40,
40,
41,
42,
42,
42,
42,
43,
43,
43,
43,
44,
44,
45,
45,
46,
46,
46,
46,
47,
47,
47,
47,
48,
48,
49,
49,
49,
50,
50,
50,
50,
51,
51,
51,
52,
52,
52,
52,
53,
53,
53,
53,
54,
54,
55,
55,
55,
55,
56,
57,
57,
57,
57,
58,
58,
58,
58,
59,
59,
59,
59,
60,
60,
60,
60,
61,
61,
61,
62,
63,
63,
64,
64,
64,
65,
65,
65,
65,
66,
66,
66,
66,
67,
67,
67,
67,
68,
68,
68,
69,
69,
69,
69,
70,
70,
70,
70,
71,
71,
71,
71,
72,
73,
73,
73,
73,
74,
74,
74,
75,
76,
76,
76,
76,
77,
77,
77,
77,
78,
78,
78,
79,
79,
79,
79,
80,
80,
80,
80,
81,
81,
81,
81,
82,
82,
83,
83,
84,
84,
84,
85,
85,
85,
86,
86,
86,
86,
87,
87,
87,
87,
88,
88,
88,
88,
89,
89,
89,
89,
90,
90,
90,
90,
91,
91,
91,
91,
92,
92,
92,
92,
93,
93,
93,
93,
94,
94,
94,
94,
95,
95,
95,
95,
96,
96,
96,
96,
97,
97,
97,
98,
98,
98,
98,
99,
99,
99,
99,
100,
101,
101,
101,
102,
102,
102,
102,
103,
103,
103,
103,
104,
104,
105,
105,
105,
105,
106,
106,
106,
106,
107,
107,
107,
107,
108,
108,
108,
108,
109,
109,
109,
109,
110,
110,
111,
111,
112,
112,
112,
112,
113,
113,
113,
113,
114,
115,
115,
115,
115,
116,
116,
116,
116,
117,
117,
117,
117,
118,
118,
119,
119,
119,
119,
120,
120,
120,
120,
121,
121,
121,
122,
123,
123,
123,
123,
124,
124,
124,
125,
125,
125,
125,
126,
126,
126,
126,
127,
127,
128,
]

Comment on lines +28 to +30
group = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0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4, 0, 4, 0, 4, 8, 12, 0, 4, 8, 12, 0, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 12, 0, 0, 4, 8, 12, 0, 4, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 0]
cu = [13, 12, 12, 12, 28, 0, missing, 16, 9, 2, 28, 28, 28, 28, 28, missing, 28, 28, 17, 28, 28, missing, 16, 0, 0, missing, 28, 28, 28, 28, 17, 0, missing, 28, 27, 28, 28, 26, 24, 28, 28, 28, 25, 28, 26, 28, 18, 16, 28, 28, 7, 0, 2, 28, 2, 4, 1, 28, 28, 16, 28, 28, 24, 26, 15, 28, 25, 17, 1, 8, 28, 24, 27, 28, 28, 28, 28, 28, 27, 28, 28, 28, 28, 20, 28, 28, 28, 28, 12, 28, missing, 17, 15, 14, 28, 0, 28, 28, 28, 0, 0, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 21, 24, 28, 27, 28, 28, 26, missing, 28, missing, 20, 2, 3, 7, 28, 1, 19, 8, 21, 7, 28, 28, 20, 28, 28, 28, 24, 20, 17, 11, 25, 25, 28, 26, 28, 24, 17, 16, 27, 14, 28, 28, 28, 28, 28, 28, 14, 13, 4, 24, 28, 28, 28, 21, 28, 21, 26, 28, 28, 0, 0, 28, 23, 20, 28, 20, 16, 28, 28, 28, 10, 1, 1, 2, 28, 28, 28, 28, 18, 22, 9, 15, 28, 9, 1, 20, 18, 20, 24, 28, 28, 28, 19, 28, 28, 28, 28, 28, 28, 28, 28, 28, 4, 14, 20, 28, 28, 0, 0, 0, 28, 20, 9, 24, 28, 28, 28, 28, 28, 21, 28, 28, 14, 24, 28, 23, 0, 0, 0, 28, missing, 28, missing, 28, 15, missing, 12, 25, missing, 28, 2, 0, 0, 28, 10, 0, 0, 28, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 2, 1, 0, 21, 14, 7, 8, 28, 28, 28, 0, 28, 28, 20, 18, 24, 0, 0, 0, 28, 15, missing, 28, 1, 1, 2, 28, 1, 0, 0, 28, 28, 14, 21, 25, 19, 16, 13, 28, 28, 28, 28, 28, 28, 28, 27, 19, 21, 18, 1, 0, 0, 28, 28, 28, 28, 28, 24, 27, 28, 18, 0, 3, 8, 28, 28, 28, 9, 20, 25, 20, 12, 19, 0, 0, 0, 27, 28, 0, 0, 0, 20, 17, 16, 14, 28, 7, 0, 1, 28, 24, 28, 25, 23, 20, 28, 14, 16, 7, 28, 28, 26, 28, 28, 26, 28, 28, 28, 24, 20, 28, 28, 28, 28, 28, 8, 6, 4, 28, 20, 28]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
group = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 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, 4, 8, 12, 0, 4, 8, 12, 0, 4, 0, 4, 8, 12, 0, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 12, 0, 0, 4, 0, 4, 8, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 0, 4, 8, 12, 0, 4, 8, 0, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 0, 4, 0, 4, 8, 0, 4, 8, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 0, 4, 8, 12, 0, 4, 8, 12, 0, 0, 4, 8, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 0, 4, 0, 4, 8, 12, 0, 4, 8, 12, 0, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 12, 0, 0, 4, 8, 12, 0, 4, 12, 0, 4, 8, 12, 0, 4, 8, 12, 0, 4, 0]
cu = [13, 12, 12, 12, 28, 0, missing, 16, 9, 2, 28, 28, 28, 28, 28, missing, 28, 28, 17, 28, 28, missing, 16, 0, 0, missing, 28, 28, 28, 28, 17, 0, missing, 28, 27, 28, 28, 26, 24, 28, 28, 28, 25, 28, 26, 28, 18, 16, 28, 28, 7, 0, 2, 28, 2, 4, 1, 28, 28, 16, 28, 28, 24, 26, 15, 28, 25, 17, 1, 8, 28, 24, 27, 28, 28, 28, 28, 28, 27, 28, 28, 28, 28, 20, 28, 28, 28, 28, 12, 28, missing, 17, 15, 14, 28, 0, 28, 28, 28, 0, 0, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 21, 24, 28, 27, 28, 28, 26, missing, 28, missing, 20, 2, 3, 7, 28, 1, 19, 8, 21, 7, 28, 28, 20, 28, 28, 28, 24, 20, 17, 11, 25, 25, 28, 26, 28, 24, 17, 16, 27, 14, 28, 28, 28, 28, 28, 28, 14, 13, 4, 24, 28, 28, 28, 21, 28, 21, 26, 28, 28, 0, 0, 28, 23, 20, 28, 20, 16, 28, 28, 28, 10, 1, 1, 2, 28, 28, 28, 28, 18, 22, 9, 15, 28, 9, 1, 20, 18, 20, 24, 28, 28, 28, 19, 28, 28, 28, 28, 28, 28, 28, 28, 28, 4, 14, 20, 28, 28, 0, 0, 0, 28, 20, 9, 24, 28, 28, 28, 28, 28, 21, 28, 28, 14, 24, 28, 23, 0, 0, 0, 28, missing, 28, missing, 28, 15, missing, 12, 25, missing, 28, 2, 0, 0, 28, 10, 0, 0, 28, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 2, 1, 0, 21, 14, 7, 8, 28, 28, 28, 0, 28, 28, 20, 18, 24, 0, 0, 0, 28, 15, missing, 28, 1, 1, 2, 28, 1, 0, 0, 28, 28, 14, 21, 25, 19, 16, 13, 28, 28, 28, 28, 28, 28, 28, 27, 19, 21, 18, 1, 0, 0, 28, 28, 28, 28, 28, 24, 27, 28, 18, 0, 3, 8, 28, 28, 28, 9, 20, 25, 20, 12, 19, 0, 0, 0, 27, 28, 0, 0, 0, 20, 17, 16, 14, 28, 7, 0, 1, 28, 24, 28, 25, 23, 20, 28, 14, 16, 7, 28, 28, 26, 28, 28, 26, 28, 28, 28, 24, 20, 28, 28, 28, 28, 28, 8, 6, 4, 28, 20, 28]
group = [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0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8,
0,
4,
8,
12,
0,
4,
8,
12,
0,
4,
0,
4,
8,
12,
0,
4,
8,
12,
0,
4,
8,
12,
0,
4,
8,
12,
0,
4,
8,
12,
0,
4,
0,
4,
0,
4,
8,
12,
0,
4,
8,
12,
0,
0,
4,
8,
12,
0,
4,
8,
12,
0,
4,
8,
12,
0,
4,
0,
4,
8,
12,
0,
4,
8,
12,
0,
4,
12,
0,
0,
4,
8,
12,
0,
4,
12,
0,
4,
8,
12,
0,
4,
8,
12,
0,
4,
0,
]
cu = [
13,
12,
12,
12,
28,
0,
missing,
16,
9,
2,
28,
28,
28,
28,
28,
missing,
28,
28,
17,
28,
28,
missing,
16,
0,
0,
missing,
28,
28,
28,
28,
17,
0,
missing,
28,
27,
28,
28,
26,
24,
28,
28,
28,
25,
28,
26,
28,
18,
16,
28,
28,
7,
0,
2,
28,
2,
4,
1,
28,
28,
16,
28,
28,
24,
26,
15,
28,
25,
17,
1,
8,
28,
24,
27,
28,
28,
28,
28,
28,
27,
28,
28,
28,
28,
20,
28,
28,
28,
28,
12,
28,
missing,
17,
15,
14,
28,
0,
28,
28,
28,
0,
0,
0,
28,
28,
28,
28,
28,
28,
28,
28,
28,
28,
28,
21,
24,
28,
27,
28,
28,
26,
missing,
28,
missing,
20,
2,
3,
7,
28,
1,
19,
8,
21,
7,
28,
28,
20,
28,
28,
28,
24,
20,
17,
11,
25,
25,
28,
26,
28,
24,
17,
16,
27,
14,
28,
28,
28,
28,
28,
28,
14,
13,
4,
24,
28,
28,
28,
21,
28,
21,
26,
28,
28,
0,
0,
28,
23,
20,
28,
20,
16,
28,
28,
28,
10,
1,
1,
2,
28,
28,
28,
28,
18,
22,
9,
15,
28,
9,
1,
20,
18,
20,
24,
28,
28,
28,
19,
28,
28,
28,
28,
28,
28,
28,
28,
28,
4,
14,
20,
28,
28,
0,
0,
0,
28,
20,
9,
24,
28,
28,
28,
28,
28,
21,
28,
28,
14,
24,
28,
23,
0,
0,
0,
28,
missing,
28,
missing,
28,
15,
missing,
12,
25,
missing,
28,
2,
0,
0,
28,
10,
0,
0,
28,
0,
0,
0,
23,
0,
0,
0,
28,
0,
0,
0,
28,
0,
0,
0,
28,
2,
1,
0,
21,
14,
7,
8,
28,
28,
28,
0,
28,
28,
20,
18,
24,
0,
0,
0,
28,
15,
missing,
28,
1,
1,
2,
28,
1,
0,
0,
28,
28,
14,
21,
25,
19,
16,
13,
28,
28,
28,
28,
28,
28,
28,
27,
19,
21,
18,
1,
0,
0,
28,
28,
28,
28,
28,
24,
27,
28,
18,
0,
3,
8,
28,
28,
28,
9,
20,
25,
20,
12,
19,
0,
0,
0,
27,
28,
0,
0,
0,
20,
17,
16,
14,
28,
7,
0,
1,
28,
24,
28,
25,
23,
20,
28,
14,
16,
7,
28,
28,
26,
28,
28,
26,
28,
28,
28,
24,
20,
28,
28,
28,
28,
28,
8,
6,
4,
28,
20,
28,
]

cu = [13, 12, 12, 12, 28, 0, missing, 16, 9, 2, 28, 28, 28, 28, 28, missing, 28, 28, 17, 28, 28, missing, 16, 0, 0, missing, 28, 28, 28, 28, 17, 0, missing, 28, 27, 28, 28, 26, 24, 28, 28, 28, 25, 28, 26, 28, 18, 16, 28, 28, 7, 0, 2, 28, 2, 4, 1, 28, 28, 16, 28, 28, 24, 26, 15, 28, 25, 17, 1, 8, 28, 24, 27, 28, 28, 28, 28, 28, 27, 28, 28, 28, 28, 20, 28, 28, 28, 28, 12, 28, missing, 17, 15, 14, 28, 0, 28, 28, 28, 0, 0, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 21, 24, 28, 27, 28, 28, 26, missing, 28, missing, 20, 2, 3, 7, 28, 1, 19, 8, 21, 7, 28, 28, 20, 28, 28, 28, 24, 20, 17, 11, 25, 25, 28, 26, 28, 24, 17, 16, 27, 14, 28, 28, 28, 28, 28, 28, 14, 13, 4, 24, 28, 28, 28, 21, 28, 21, 26, 28, 28, 0, 0, 28, 23, 20, 28, 20, 16, 28, 28, 28, 10, 1, 1, 2, 28, 28, 28, 28, 18, 22, 9, 15, 28, 9, 1, 20, 18, 20, 24, 28, 28, 28, 19, 28, 28, 28, 28, 28, 28, 28, 28, 28, 4, 14, 20, 28, 28, 0, 0, 0, 28, 20, 9, 24, 28, 28, 28, 28, 28, 21, 28, 28, 14, 24, 28, 23, 0, 0, 0, 28, missing, 28, missing, 28, 15, missing, 12, 25, missing, 28, 2, 0, 0, 28, 10, 0, 0, 28, 0, 0, 0, 23, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 2, 1, 0, 21, 14, 7, 8, 28, 28, 28, 0, 28, 28, 20, 18, 24, 0, 0, 0, 28, 15, missing, 28, 1, 1, 2, 28, 1, 0, 0, 28, 28, 14, 21, 25, 19, 16, 13, 28, 28, 28, 28, 28, 28, 28, 27, 19, 21, 18, 1, 0, 0, 28, 28, 28, 28, 28, 24, 27, 28, 18, 0, 3, 8, 28, 28, 28, 9, 20, 25, 20, 12, 19, 0, 0, 0, 27, 28, 0, 0, 0, 20, 17, 16, 14, 28, 7, 0, 1, 28, 24, 28, 25, 23, 20, 28, 14, 16, 7, 28, 28, 26, 28, 28, 26, 28, 28, 28, 24, 20, 28, 28, 28, 28, 28, 8, 6, 4, 28, 20, 28]
set = fill(28, length(cu))

cu_df = DataFrame(id=id, group=group, week=week, cu=cu)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
cu_df = DataFrame(id=id, group=group, week=week, cu=cu)
cu_df = DataFrame(; id=id, group=group, week=week, cu=cu)


##

@df cu_df_filtered groupedhist(:cu,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@df cu_df_filtered groupedhist(:cu,
@df cu_df_filtered groupedhist(
:cu,

ylims=(0, Inf),
legend=false,
framestyle=:axes,
size=(1000, 500)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
size=(1000, 500)
size=(1000, 500),

Comment on lines +165 to +167
histogram(all_samples, title="All Prior Predictive Samples",
xlabel="Value", ylabel="Frequency",
legend=false, alpha=0.7)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
histogram(all_samples, title="All Prior Predictive Samples",
xlabel="Value", ylabel="Frequency",
legend=false, alpha=0.7)
histogram(
all_samples;
title="All Prior Predictive Samples",
xlabel="Value",
ylabel="Frequency",
legend=false,
alpha=0.7,
)

cu=df.cu,
group=df.group,
week=df.week,
id=df.id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
id=df.id
id=df.id,

chain_type=MCMCChains.Chains,
n_adapts=n_adapts,
init_params=initial_θ,
discard_initial=n_adapts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
discard_initial=n_adapts
discard_initial=n_adapts,

Comment on lines +215 to +217
plot_rank(
data
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
plot_rank(
data
)
plot_rank(data)


# posterior predictive checks

# simulation based calibration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
# simulation based calibration
# simulation based calibration

Copy link
Contributor

JuliaBUGS.jl documentation for PR #298 is available at:
https://TuringLang.github.io/JuliaBUGS.jl/previews/PR298/

@coveralls
Copy link

coveralls commented May 15, 2025

Pull Request Test Coverage Report for Build 15049194373

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.518%

Totals Coverage Status
Change from base Build 15044384247: 0.0%
Covered Lines: 2108
Relevant Lines: 2524

💛 - Coveralls

Copy link
Contributor

Benchmark results on macOS (aarch64)

BridgeStan not found at location specified by $BRIDGESTAN environment variable, downloading version 2.6.2 to /Users/runner/.bridgestan/bridgestan-2.6.2
Done!

Stan results:

Model Parameters Density Time (µs) Density+Gradient Time (µs)
rats 65 5.0334 7.20833
pumps 12 0.823935 0.921296
bones 13 74.208 84.5
oxford 244 10.4165 13.25
epil 303 34.292 37.4795
lsat 1006 106.083 151.667
schools 133 235.458 390.959
beetles 2 0.766447 0.842438
air 5 0.823212 0.9333

JuliaBUGS Mooncake results:

Model Parameters Density Time (µs) Density+Gradient Time (µs)
rats 65 1.25415 7.97233
pumps 12 0.478407 2.04165
bones 33 67.625 357.333
oxford 244 19.833 53.541
epil 303 7.29175 34.792
lsat 1006 51.084 227.625
schools 133 92.167 820.625
beetles 2 0.876273 3.59375
air 5 0.252496 1.11538

Benchmark results on Ubuntu (x64)

BridgeStan not found at location specified by $BRIDGESTAN environment variable, downloading version 2.6.2 to /home/runner/.bridgestan/bridgestan-2.6.2
Done!

Stan results:

Model Parameters Density Time (µs) Density+Gradient Time (µs)
rats 65 5.2278 7.61767
pumps 12 0.9601 1.20304
bones 13 72.846 90.419
oxford 244 13.8955 17.994
epil 303 27.531 33.9685
lsat 1006 164.827 206.04
schools 133 529.272 769.335
beetles 2 0.852471 0.996345
air 5 0.66475 0.79527

JuliaBUGS Mooncake results:

Model Parameters Density Time (µs) Density+Gradient Time (µs)
rats 65 1.91723 13.931
pumps 12 0.593959 2.417
bones 33 48.951 367.185
oxford 244 23.674 72.375
epil 303 10.925 56.084
lsat 1006 89.898 366.935
schools 133 103.638 1087.47
beetles 2 1.10435 4.63017
air 5 0.341773 1.36729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants