You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of having a class hierarchy create a single Normal class which in its constructor composes different versions of normal by passing different implementations of sample, pdf, ...
This ensures that
if x=Normal(mean, cov) is called, the type of x is Normal
the user does not need to care about different types of normal distributions
The different classes implementing different normal distributions currently only exist to implement efficient sampling, pdf computation, etc. The refactored class would have one large __init__ but the rest of the class is simpler.
The text was updated successfully, but these errors were encountered:
I am intrigued what comes out because a similar pattern is used in Kalman, ExtendedKalman and UnscentedKalman. I suppose that if it is a clear improvement here, it could be a clear improvement there.
Instead of having a class hierarchy create a single
Normal
class which in its constructor composes different versions of normal by passing different implementations ofsample
,pdf
, ...This ensures that
x=Normal(mean, cov)
is called, the type ofx
isNormal
The different classes implementing different normal distributions currently only exist to implement efficient sampling, pdf computation, etc. The refactored class would have one large
__init__
but the rest of the class is simpler.The text was updated successfully, but these errors were encountered: