This seems to be an issue with inheritance and mixins. All of the Identity emissions models inherit from a distribution class and the _IdentityEmissions class. For example, the GaussianIdentityEmissions declarations is
class GaussianIdentityEmissions(_GaussianEmissionsMixin, _IdentityEmissions):
So when code tries to access GaussianIdentityEmissions.params, python will find the .params method in the _GaussianEmissionsMixin, which will call the params method for _IdentityEmissions, which finally calls the params method for the base Emissions class and raises NotImplementedError.
So the call chain (I think) is: _GaussianEmissionsMixin.params => _IdentityEmissions.params => Emissions.params.
One solution here is to add a params function to _IdentityEmissions which returns an empty list. There might be a more elegant solution though.
None of the identity emissions models seems to work, e.g "GaussianIdentityEmissions, StudentstIdentityEmissions", etc.
The failure looks as follows:
This seems to be an issue with inheritance and mixins. All of the Identity emissions models inherit from a distribution class and the _IdentityEmissions class. For example, the GaussianIdentityEmissions declarations is
class GaussianIdentityEmissions(_GaussianEmissionsMixin, _IdentityEmissions):
So when code tries to access
GaussianIdentityEmissions.params
, python will find the.params
method in the_GaussianEmissionsMixin
, which will call theparams
method for_IdentityEmissions
, which finally calls theparams
method for the baseEmissions
class and raises NotImplementedError.So the call chain (I think) is: _GaussianEmissionsMixin.params => _IdentityEmissions.params => Emissions.params.
One solution here is to add a params function to _IdentityEmissions which returns an empty list. There might be a more elegant solution though.