Skip to content
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

VMF scaling denominator was inf #10

Open
rana-alshaikh opened this issue Aug 16, 2018 · 8 comments
Open

VMF scaling denominator was inf #10

rana-alshaikh opened this issue Aug 16, 2018 · 8 comments

Comments

@rana-alshaikh
Copy link

Hi
I tried to run the soft version, and this error appears 'VMF scaling denominator was inf'. what could be the reasons for that.
Another question is there any way to estimate the number of the clusters.

Thanks

@jasonlaska
Copy link
Owner

It would be great to know a bit about the data you're working with. That exception is raised when the dimension is too large.

@ivarru
Copy link

ivarru commented Dec 5, 2018

I experience the same problem when the dimension is relatively low. For example, the test test_integration_dense in test_von_mises_fisher_mixture.py raises this exception most of the time if I let n_features = 10 (and fixes params_in to {"posterior_type": "soft"}).

@itamar-dw
Copy link

itamar-dw commented Dec 10, 2019

see my comment here #17
EDIT
It is actually straight forward to work in log scale using the exponentially-scaled modified Bessel functions:

from numpy import i0e  # exp-scaled modified Bessel function of first kind order 0, I_0                                                                                                                               
from scipy.special import ive  # exp-scaled modified Bessel function of first kind, I_v   

@jasonlaska
Copy link
Owner

jasonlaska commented Dec 28, 2019

Thanks @itamar-dw would you like to add a PR for this change?

@itamar-dw
Copy link

itamar-dw commented Dec 29, 2019

sure.
I tried to create a new branch and push it, but I got:

remote: Permission to jasonlaska/spherecluster.git denied to itamar-dw

@jasonlaska
Copy link
Owner

@itamar-dw I saw one branch come up but it was derived off of master. Could you try branching off develop (pull the latest develop first or rebase), then tag me on the PR? I will merge it in after testing and reviewing.

You should be able to submit a PR for this project via the github UI by forking to your own account first https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project

Let me know if you need help.

@jasonlaska
Copy link
Owner

Alternatively, I'm happy to cherry-pick from a gist, if that's easier.

@itamar-dw
Copy link

Yes I created a PR then I realized I have to create a branch first. I'll do it as you suggested, that's an opportunity to learn how to do it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants