-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scaled_fa update: s beomces zero #12
Comments
Well if s is being set to zero then this means that the likelihood is being maximized at s = 0? Or is this a bug? I would verify this first. If it is correct—not a bug—then this means that this mixture component is behaving as a delta mass. I'm not sure how best to deal with this case, but it seems that the simplest approach would be to constrain s to be positive. We could potentially accommodate s = 0 but it would make the code significantly more complicated. |
i think s=0 is a valid mle, so we should try to allow for it.
…On Wed, Dec 8, 2021 at 8:58 AM Peter Carbonetto ***@***.***> wrote:
Well if s is being set to zero then this means that the likelihood is
being maximized at s = 0? Or is this a bug? I would verify this first. If
it is correct—not a bug—then this means that this mixture component is
behaving as a delta mass. I'm not sure how best to deal with this case, but
it seems that the simplest approach would be to constrain s to be positive.
We could potentially accommodate s = 0 but it would make the code
significantly more complicated.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANXRRMTXNQWUZAQP652643UP5XCXANCNFSM5JSH6UEQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I'm not sure why NA is being obtained - is this an issue with optim?
If so, can we fix it by just defining the update to "do nothing" if
initialized at s=0?
On Wed, Dec 8, 2021 at 11:12 AM Matthew Stephens ***@***.***>
wrote:
… i think s=0 is a valid mle, so we should try to allow for it.
On Wed, Dec 8, 2021 at 8:58 AM Peter Carbonetto ***@***.***>
wrote:
> Well if s is being set to zero then this means that the likelihood is
> being maximized at s = 0? Or is this a bug? I would verify this first. If
> it is correct—not a bug—then this means that this mixture component is
> behaving as a delta mass. I'm not sure how best to deal with this case, but
> it seems that the simplest approach would be to constrain s to be positive.
> We could potentially accommodate s = 0 but it would make the code
> significantly more complicated.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#12 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AANXRRMTXNQWUZAQP652643UP5XCXANCNFSM5JSH6UEQ>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
|
oh, i see, it is in the FA update, not optim.
Yes, let's just define the FA update to keep s=0 if initialized at s=0.
On Wed, Dec 8, 2021 at 11:14 AM Matthew Stephens ***@***.***>
wrote:
… I'm not sure why NA is being obtained - is this an issue with optim?
If so, can we fix it by just defining the update to "do nothing" if
initialized at s=0?
On Wed, Dec 8, 2021 at 11:12 AM Matthew Stephens ***@***.***>
wrote:
> i think s=0 is a valid mle, so we should try to allow for it.
>
> On Wed, Dec 8, 2021 at 8:58 AM Peter Carbonetto ***@***.***>
> wrote:
>
>> Well if s is being set to zero then this means that the likelihood is
>> being maximized at s = 0? Or is this a bug? I would verify this first. If
>> it is correct—not a bug—then this means that this mixture component is
>> behaving as a delta mass. I'm not sure how best to deal with this case, but
>> it seems that the simplest approach would be to constrain s to be positive.
>> We could potentially accommodate s = 0 but it would make the code
>> significantly more complicated.
>>
>> —
>> You are receiving this because you are subscribed to this thread.
>> Reply to this email directly, view it on GitHub
>> <#12 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AANXRRMTXNQWUZAQP652643UP5XCXANCNFSM5JSH6UEQ>
>> .
>> Triage notifications on the go with GitHub Mobile for iOS
>> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
>> or Android
>> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>>
>>
>
|
Okay, then in some parts of the code an if-else statement will be needed check for the special case that the prior covariance matrix U is a matrix of zeros. |
I added a check to fa_scaled_iid() and fa_scaled_notiid() to check whether s==0 or U0 == a matrix of all 0s. And I checked on simple simulated data by input a matrix of all 0s, it works fine. |
What happens to the posterior probabilities computed in |
In the real data example, s = 0 component has exactly 0 weight. While for the matrix of all 0s, the weight is very close to 0, 3.250872e-317. But I don't think there is a relationship between s=0/U all zeros and weight being 0? |
I agree i don't see that there would be an obvious relationship
…On Wed, Dec 8, 2021, 19:42 yunqiyang0215 ***@***.***> wrote:
In the real data example, s = 0 component has exactly 0 weight. While for
the matrix of all 0s, the weight is very close to 0, 3.250872e-317. But I
don't think there is a relationship between s=0/U all zeros and weight
being 0?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANXRRJHTJQDMHQKJQ4A6JLUQACR7ANCNFSM5JSH6UEQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Sorry that's an error on my part. It does make me think that for some of the U updates we might want to add checks for U being a matrix of zeros. For example, if U is a matrix of zeros, will the ED update have any effect? |
i think it won't have any effect
…On Thu, Dec 9, 2021 at 10:44 AM Peter Carbonetto ***@***.***> wrote:
Sorry that's an error on my part.
It does make me think that for some of the U updates we might want to add
checks for U being a matrix of zeros. For example, if U is a matrix of
zeros, will the ED update have any effect?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANXRRIAVTHRUG2754GWCQ3UQDMHDANCNFSM5JSH6UEQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Yeah so we might want to give a warning or error for this case since it could conceivably happen. |
I noticed that from the ukbblood cell data example, an error arises possibly due to the fact the updated s becomes 0 in the current iteration. Then in the next iteration, estimated s will be NA. In the previous iteration, s=0.002099687.
The bug should occur in fa_scaled_iid() and fa_scaled_notiid(). The input s shouldn't be 0. One way is to add a constraint to s before running fa_scaled_iid().
However, if input s=0, fa_scaled_iid() couldn't run. Not sure how s=NA is created.
The text was updated successfully, but these errors were encountered: