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
Because the responsibilities and the mixture coefficients live on a simplex (along one axis), it is not straighforward to set just one of them without altering the corresponding other values.
To somehow make that clearer, I separated the setting and the normalization into separate steps. However, that, too, seems at times counterintuitive and cumbersome, because one always has to call separate methods.
One option to make it a little better could be a context manager, like this:
# some code to initialize the mixture modelmodel= ...
# enter the "mixture coefficient context"withmodel.mixture_coefs_context():
model.set_mixture_coefs(arr1, component=1)
model.set_mixture_coefs(arr2, subgroup="C01")
Upon exiting the context, everything would be normalized.
The text was updated successfully, but these errors were encountered:
In case one uses the context manager approach: This could mean that we automatically normalize the coefficients after setting them, when NOT in the context. Only when IN the context, we could omit this step as it is performed automatically when leaving the context.
Because the responsibilities and the mixture coefficients live on a simplex (along one axis), it is not straighforward to set just one of them without altering the corresponding other values.
To somehow make that clearer, I separated the setting and the normalization into separate steps. However, that, too, seems at times counterintuitive and cumbersome, because one always has to call separate methods.
One option to make it a little better could be a context manager, like this:
Upon exiting the context, everything would be normalized.
The text was updated successfully, but these errors were encountered: