-
Couldn't load subscription status.
- Fork 1
Ming/brain cc #89
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
base: main
Are you sure you want to change the base?
Ming/brain cc #89
Changes from 1 commit
def76e1
7124be8
a4268b3
39e3b4f
db8bd4c
e1a7a65
5f3443d
57093a5
7d7e431
3f7107b
2ea79f0
5fef72f
f8fe04a
2ace48b
3ce9937
c4a8c3b
a78bc33
80dc5a9
52d82e8
6dcbcdb
213853d
f54313a
376714a
e66f92a
ab48aad
e931809
0ef1720
ce4170e
21d84b5
281341d
34edc16
b918d98
f287d6a
d22d6eb
7bae3ac
028e241
e13dbf8
79e5ccb
e262b40
10869c8
1cd516c
4431d84
a7b2101
fcc077d
eb8f558
72b27a9
f9d6331
3bcd86e
7ad5e6e
5b04eab
86489db
5d62129
1105ca5
1fb556d
9f3a556
89e650a
0665bf6
079dd95
d731a04
d564a4b
a6f4861
5c9ff34
ebb360c
a160557
fcc2d57
6bee075
6398e96
103765d
1364e32
23b61cb
cb005bd
49942db
eb4703e
88bb1aa
dbe80f4
2b5a142
b1f8cb0
b251d58
f186cca
7b759b6
a26efc4
0aa5fc3
c7bb85d
1074abb
5e842ac
73517dd
1681d10
2932211
f489b00
e136b05
86f6ffa
c584552
56a32b7
9532ca4
8f87d6c
ac3e15a
84aab15
7b79dfa
869c12f
30eabf0
3880ae7
0596d74
d9a2bd7
4f09a6e
645233d
cbce7ec
c94155e
a900ddb
ab304e1
f426e81
13e608f
dbe38a8
5e79233
d35f129
89c67c4
d239e53
e811546
e40ae07
c323a4e
7959f40
0036eaf
bebebdc
322a9e0
ccd0796
59b6ebc
d9cba37
aafc5ce
d8352e6
8f70f77
33184f8
c3a6b38
4befe69
4867e7f
d44ea72
b3986f6
146d233
3b35103
3a54043
68f9132
782f892
a990c17
4f7441c
4a33733
e6fa2ff
0543397
d0d7161
8f83203
2607e4b
14d47fc
18692bd
bb2346a
fa80979
96d38e1
6624824
ba83c9f
2143282
6a9df6b
2e0c640
54cc243
0c39e83
2c5245c
7f93291
0f92e1d
0cb818f
0a2fc39
eaa8217
08c2d5c
38ba91a
1d49fa0
499f222
fed0b7a
8ca11e2
b70a0f3
8c0030a
d043a27
b7e19cd
8de679b
9cea089
7cb2ec0
da626c5
f98d68a
990b3f9
a370e53
28f8e0a
7dc6f88
6e04411
bbea15c
03305f0
9b0a05e
b4ab300
f44df04
1b1d3e0
84b81fd
0b6f5c6
cf88495
512c9c3
dfae7e0
6e7a7cf
3ea4bd8
abab192
9c93815
1301c55
4b4ea1d
38c4fcd
4cabd18
ba7e00a
7e41e2a
846b69d
59a4912
19e1563
cd49c6e
87a9994
c75eadb
d3d0bae
e11abe5
0559d54
8440b5c
481bd1b
003dcee
772c91f
622936b
42682ee
9b0630c
d4b7942
8f9a458
cd17197
57184bb
98afeae
f31fc38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,8 @@ | |
| from typing import List, Optional | ||
|
|
||
| import numpy as np | ||
| from coordination.module.coordination.dirichlet_gaussian_coordination_3d import DirichletGaussianCoordination3D | ||
| from coordination.module.coordination.sigmoid_gaussian_coordination_3d import SigmoidGaussianCoordination3D | ||
| import pymc as pm | ||
|
|
||
| from coordination.common.constants import DEFAULT_SEED | ||
|
|
@@ -254,18 +256,34 @@ def _create_coordination(self, bundle): | |
| # Also include parameters for us to able to set the values of individualism, | ||
| # coordination and common cause independently when use the newly implemented 3d | ||
| # coordination modules. | ||
| coordination = SigmoidGaussianCoordination( | ||
| pymc_model=self.pymc_model, | ||
| num_time_steps=bundle.num_time_steps_to_fit, | ||
| mean_mean_uc0=bundle.mean_mean_uc0, | ||
| sd_mean_uc0=bundle.sd_mean_uc0, | ||
| sd_sd_uc=bundle.sd_sd_uc, | ||
| mean_uc0=bundle.mean_uc0, | ||
| sd_uc=bundle.sd_uc, | ||
| initial_samples=initial_samples, | ||
| unbounded_coordination_observed_values=given_coordination, | ||
| include_common_cause=bundle.common_cause | ||
| ) | ||
| if bundle.coordination_mode == "dirichlet": | ||
| coordination = DirichletGaussianCoordination3D( | ||
| pymc_model=self.pymc_model, | ||
| num_time_steps=bundle.num_time_steps_to_fit, | ||
| mean_mean_uc0=bundle.mean_mean_uc0, | ||
| sd_mean_uc0=bundle.sd_mean_uc0, | ||
| sd_sd_uc=bundle.sd_sd_uc, | ||
| mean_uc0=bundle.mean_uc0, | ||
| sd_uc=bundle.sd_uc, | ||
| initial_samples=bundle.initial_coordination_samples, | ||
| unbounded_coordination_observed_values=given_coordination, | ||
| include_common_cause=bundle.enable_common_cause | ||
|
||
| ) | ||
| elif bundle.coordination_mode == "sigmoid": | ||
| coordination = SigmoidGaussianCoordination3D( | ||
| pymc_model=self.pymc_model, | ||
| num_time_steps=bundle.num_time_steps_to_fit, | ||
| mean_mean_uc0=bundle.mean_mean_uc0, | ||
| sd_mean_uc0=bundle.sd_mean_uc0, | ||
| sd_sd_uc=bundle.sd_sd_uc, | ||
| mean_uc0=bundle.mean_uc0, | ||
| sd_uc=bundle.sd_uc, | ||
| initial_samples=bundle.initial_coordination_samples, | ||
| unbounded_coordination_observed_values=given_coordination, | ||
| include_common_cause=bundle.enable_common_cause | ||
| ) | ||
| else: | ||
| raise ValueError("Unknown coordination mode: " + str(bundle.coordination_mode)) | ||
| return coordination | ||
|
|
||
| def _get_adjusted_bundle(self) -> BrainBundle: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to remove this completely. We still want to use SigmoidGaussianCoordination when common cause is False. You should add an if/else here for
bundle.common_cause.