Skip to content
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

Add support for nonlinear value coupling #215

Merged
merged 32 commits into from
Aug 22, 2024

Conversation

KoraTMontemagno
Copy link
Contributor

I tried to update the functions using non linear equations
I don't know if I handled correctly the static arguments though...

@LegrandNico LegrandNico changed the title Nonlinear Add support for nonlinear coupling functions between parent/child nodes Aug 8, 2024
@LegrandNico LegrandNico force-pushed the nonlinear branch 3 times, most recently from 122b4ad to 4cd862e Compare August 9, 2024 08:50
@LegrandNico LegrandNico changed the title Add support for nonlinear coupling functions between parent/child nodes Add support for nonlinear value coupling Aug 9, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 94.28571% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.05%. Comparing base (f943078) to head (85e35e8).

Files Patch % Lines
src/pyhgf/model/network.py 90.90% 1 Missing ⚠️
src/pyhgf/utils.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
- Coverage   95.10%   95.05%   -0.05%     
==========================================
  Files          23       23              
  Lines        1184     1213      +29     
==========================================
+ Hits         1126     1153      +27     
- Misses         58       60       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

KoraTMontemagno and others added 20 commits August 22, 2024 19:55
…he Edges variable,

and can be specified when using the function .add_node in the Network class.
Both the belief update and the prediction error steps have been changed.

I have compared the behaviour of my code to Peter's one in Julia and they look similar.

Next step will be figure out how to provide the function with parameters that can be retrieved
by the model fitting, but I think I need Nicolas' help :)
Now it's possible to add different coupling functions to different value parents.
There was an error in the previous code in PE calculation (it took the function g from the child node and not the parent node, in which is inputed).
Minor edits: non_linear_funct is now coupling_funct
@LegrandNico
Copy link
Collaborator

Alright, I think we can merge here, thank you for your work @KoraTMontemagno

@LegrandNico LegrandNico merged commit f72ca61 into ComputationalPsychiatry:master Aug 22, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants