Skip to content

Commit

Permalink
updated CMC code (#474)
Browse files Browse the repository at this point in the history
* switched from symbolic arrays to list of symbolic parameters. Needed to be able to set tunable flag for individual parameters of the array. Added untune! utility function to set tunable flag to false on list elements.

* added new approach to set tunable flag for the connection matrix also to the tutorial

* use generate_weight_param also in StimulusBlox and ObserverBlox connectors and set standard connection weight to non-tunable

* fixed and cleaned code

* minor changes

* update MTK compat

* added Project.toml to test

* fixed MTK compat once more

* added more packages to test environment needed in GraphDynamics tests

* remove test deps and unnecessary deps

* add Test to tect project

* remove Test dep from main Project

* add missing test deps

* add Statistics dep

* removed [extras] from Project.toml

* added [extras] again.

---------

Co-authored-by: haris organtzidis <organtzh@gmail.com>
  • Loading branch information
david-hofmann and harisorgn committed Nov 13, 2024
1 parent ebb3421 commit 8571333
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/datafitting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,17 @@ end
indices = Dict(:dspars => collect(1:np))
# Noise parameter mean
modelparam[:lnα] = zeros(Float64, 2, nrr); # intrinsic fluctuations, ln(α) as in equation 2 of Friston et al. 2014
modelparam[:lnα] = zeros(Float64, 2, nrr); # intrinsic fluctuations, ln(α) as in equation 2 of Friston et al. 2014
n = length(modelparam[:lnα]);
indices[:lnα] = collect(np+1:np+n);
np += n;
modelparam[:lnβ] = [-16.0, -16.0]; # global observation noise, ln(β) as above
modelparam[:lnβ] = [-16.0, -16.0]; # global observation noise, ln(β) as above
n = length(modelparam[:lnβ]);
indices[:lnβ] = collect(np+1:np+n);
np += n;
modelparam[:lnγ] = [-16.0, -16.0]; # region specific observation noise
modelparam[:lnγ] = [-16.0, -16.0]; # region specific observation noise
indices[:lnγ] = collect(np+1:np+nrr);
np += nrr
indices[:u] = idx_u
Expand Down

0 comments on commit 8571333

Please sign in to comment.