Skip to content

False methods in class MOU() #1

@gorkazl

Description

@gorkazl

Class MOU() contains three methods which should be reclassified as data attributes. Methods get_J(), get_Sigma() and get_tau_x() ar three "functions" which accept no parameters (except the obvious self) and they return nothing but self.J, self.Sigma and self.tau_x. Thus, they are not functions. They are references to data attributes of a class instance which should be called as such, e.g.:

mou = mou_model.MOU()
...
jac = mou.J
S = mou.Sigma
tau_x = mou.tau_x

Moreover, tau_x is a parameter of the class, because it is an input parameter in the self.__init__(). Thus, they should be made accessible as a data attributes.

The case of get_C() is even more confusing. C is an optional input parameter of self.__init__(), which is initiated as a C=None. Ok, but then C is made readable via a method, get_C() which is a transformation of J. As far as I understand, we expect that the C parameter in self.__init__() is the structural connectivity (SC) matrix, but the C returned by the method get_C() is the estimated effective connectivity (EC). I think one could give a preliminary estimate of EC as input as the starting point for the fit, instead of the SC, but I think the code is confusing because it returns a variable C which is different from the input parameter C.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions