Normalization of Kuramoto Coupling

23 views
Skip to first unread message

DK

unread,
Jul 8, 2020, 10:28:40 AM7/8/20
to TVB Users
Dear TVB community,

on the documentation page of the Kuramoto coupling it says that the coupling strength a is normalized by N, which I believe should represent the number of oscillators in the network according to the standard Kuramoto model (or in some cases the number of incoming connections), however, looking at the post() method, where this normalization takes place, the coupling strength a is normalized by gx.shape[0], which I think is neither the number of oscillators nor the number of incoming connections, or am I misunderstanding something here? Could someone explain to me what is going on there?

I hope you can help me out with this!

Best,
Dominik

WOODMAN Michael

unread,
Jul 8, 2020, 4:34:05 PM7/8/20
to TVB Users

hi


Your reading is correct, though without stepping through with a debugger, gx.shape[0] is either the number of coupling variables (1 in the case of Kuramoto model) or the number of nodes.  Apologies in advance if that is a bug; please report back if you can check this.  It should be straightforward to place a breakpoint there and inspect gx.shape.


cheers,


Marmaduke Woodman, TVB Engineer, INS AMU; +33 4 91 32 42 38 +33 7 67 77 84 72


From: tvb-...@googlegroups.com <tvb-...@googlegroups.com> on behalf of DK <dominik.pe...@gmail.com>
Sent: Wednesday, July 8, 2020 4:28:40 PM
To: TVB Users
Subject: [TVB] Normalization of Kuramoto Coupling
 
--
You received this message because you are subscribed to the Google Groups "TVB Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tvb-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tvb-users/89c87976-318c-46d2-8f83-d11c933cff14o%40googlegroups.com.

DK

unread,
Jul 9, 2020, 2:52:05 AM7/9/20
to TVB Users
Hi Marmaduke,

I did check this with a debugger, and gx in the Kuramoto post() method has shape (1, number of nodes, 1). If I use the connectivity_76.zip it would be (1, 76, 1), and if I use connectivity_192.zip it would be (1, 192, 1), which made me wonder if the coupling strength should be normalized by gx.shape[1] instead?

thanks for your insights!

Dominik


On Wednesday, 8 July 2020 22:34:05 UTC+2, marmaduke.woodman wrote:

hi


Your reading is correct, though without stepping through with a debugger, gx.shape[0] is either the number of coupling variables (1 in the case of Kuramoto model) or the number of nodes.  Apologies in advance if that is a bug; please report back if you can check this.  It should be straightforward to place a breakpoint there and inspect gx.shape.


cheers,


Marmaduke Woodman, TVB Engineer, INS AMU; +33 4 91 32 42 38 +33 7 67 77 84 72



Sent: Wednesday, July 8, 2020 4:28:40 PM
To: TVB Users
Subject: [TVB] Normalization of Kuramoto Coupling
Dear TVB community,

on the documentation page of the Kuramoto coupling it says that the coupling strength a is normalized by N, which I believe should represent the number of oscillators in the network according to the standard Kuramoto model (or in some cases the number of incoming connections), however, looking at the post() method, where this normalization takes place, the coupling strength a is normalized by gx.shape[0], which I think is neither the number of oscillators nor the number of incoming connections, or am I misunderstanding something here? Could someone explain to me what is going on there?

I hope you can help me out with this!

Best,
Dominik

--
You received this message because you are subscribed to the Google Groups "TVB Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tvb-...@googlegroups.com.

WOODMAN Michael

unread,
Jul 9, 2020, 3:36:32 AM7/9/20
to TVB Users

hi


Yes indeed it should be gx.shape[1]. This is likely a regression from previous implementation where gx.shape[0] would've been correct.  Thanks for catching.


In case it's helpful, it should be easy to incorporate the fix into your own code without modifying TVB source codE:


class KuramotoFixed(coupling.Kuramoto):

    def post(self, gx):

        return self.a * gx.shape[1] * gx


and then use KuramotoFixed instead of coupling.Kuramoto


cheers,


Marmaduke Woodman, TVB Engineer, INS AMU; +33 4 91 32 42 38 +33 7 67 77 84 72


From: tvb-...@googlegroups.com <tvb-...@googlegroups.com> on behalf of DK <dominik.pe...@gmail.com>
Sent: Thursday, July 9, 2020 8:52:04 AM
To: TVB Users
Subject: Re: [TVB] Normalization of Kuramoto Coupling
 
To unsubscribe from this group and stop receiving emails from it, send an email to tvb-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tvb-users/ef364658-d3d6-4556-832c-fb83257d0f7ao%40googlegroups.com.

DK

unread,
Jul 9, 2020, 4:02:39 AM7/9/20
to TVB Users
Hey,

no problem, and thanks for the workaround!

Dominik


On Thursday, 9 July 2020 09:36:32 UTC+2, marmaduke.woodman wrote:

hi


Yes indeed it should be gx.shape[1]. This is likely a regression from previous implementation where gx.shape[0] would've been correct.  Thanks for catching.


In case it's helpful, it should be easy to incorporate the fix into your own code without modifying TVB source codE:


class KuramotoFixed(coupling.Kuramoto):

    def post(self, gx):

        return self.a * gx.shape[1] * gx


and then use KuramotoFixed instead of coupling.Kuramoto


cheers,


Marmaduke Woodman, TVB Engineer, INS AMU; +33 4 91 32 42 38 +33 7 67 77 84 72


Reply all
Reply to author
Forward
0 new messages