You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The imitation process appears to be independent of imi_p_imitate both for 'simple' and 'complex' contagion. Setting it to 0.1 or 1.0 makes no difference. For the 'simple' case even setting it to 0.0 does not stop imitation.
example config:
culture = M.Culture(
imi_rate = {
'bool': 100, # -> 10000 updates
'ord': 0, # *10 in batch -> 10000 updates
'pair': 0, # *~50 in batch -> 10000 updates
'*': 0,
},
imi_type = 'complex',
imi_batch_n = {'bool': 2, 'ord': 10},
imi_p_in_batch = {'pair': 0.5},
imi_network = M.Culture.acquaintance_network,
imi_p_neighbor_drawn = {'pair': 1.0},
imi_n_neighbors_drawn = {'bool': 10, 'ord': 20},
imi_rel_threshold = {'bool': {
((False,),(True,)): 0.0,
((True,),(False,)): 0.0
}},
imi_abs_threshold = {'ord': 2, 'pair': 0},
imi_include_own_trait = {'pair': True, '*': False},
imi_delta = {'pair': 10.0}, # evaluation will be done by Individual.imi_evaluate_pair
imi_p_imitate = {'pair': 1.0, 'bool': 0.0} # for 'ord', the value is set by Cell.imi_p_imitate_ord
)
The text was updated successfully, but these errors were encountered:
Another error with imi_p_imitate: Setting it only for some of the traits (e.g. all but 'bool') yields an error message. Not setting it at all does not. It then shows the same behavior as setting it to any specific value (as in the bug described above).
When not setting a value for a specific trait, imi_p_imitate should be set to default. Also: I could not find any defaults in the documentation for the parameters.
To replicate use above config but change:
imi_p_imitate = {'pair': 1.0} # for 'ord', the value is set by Cell.imi_p_imitate_ord
Error message:
Traceback (most recent call last):
File "/home/leander/Documents/Studium/13/Masterthesis/pycopancore/studies/_testing/generic_imitation_simple.py", line 119, in <module>
traj = doit()
File "/home/leander/Documents/Studium/13/Masterthesis/pycopancore/studies/_testing/generic_imitation_simple.py", line 114, in doit
res = runner.run(t_0=0, t_1=t_1, dt=1)
File "/home/leander/Documents/Studium/13/Masterthesis/pycopancore/pycopancore/runners/runner.py", line 592, in run
method(inst, t)
File "/home/leander/Documents/Studium/13/Masterthesis/pycopancore/pycopancore/model_components/generic_imitation/implementation/culture.py", line 469, in perform_event
self.trigger_imitation(key)
File "/home/leander/Documents/Studium/13/Masterthesis/pycopancore/pycopancore/model_components/generic_imitation/implementation/culture.py", line 399, in trigger_imitation
if actual_p_imitate > 0:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
The imitation process appears to be independent of
imi_p_imitate
both for'simple'
and'complex'
contagion. Setting it to0.1
or1.0
makes no difference. For the'simple'
case even setting it to0.0
does not stop imitation.example config:
The text was updated successfully, but these errors were encountered: