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

Weights Function Does Not Exist #75

Open
smickusGT opened this issue Nov 9, 2020 · 3 comments
Open

Weights Function Does Not Exist #75

smickusGT opened this issue Nov 9, 2020 · 3 comments

Comments

@smickusGT
Copy link

In the documentation it describes a function weights(gm) to get the weights of the mixture model. When I try to use this function however I get an error saying that the function does not exist.

@JoshuaPurtell
Copy link
Contributor

Hi @smickusGT , does the problem persist? The minimal reprex

using GaussianMixtures
g = rand(GMM, 2, 2; kind=:full, sep=2.0)
weights(g)

seems to work.

@ForceBru
Copy link

For me it happened when I had using StatsBase, GaussianMixtures in my code. This produced a warning and the UndefVarError:

WARNING: both GaussianMixtures and StatsBase export "weights"; uses of it in module Main must be qualified
UndefVarError: weights not defined

However, this warning doesn't appear 100% of the time, so it can be quite confusing indeed

@davidavdav
Copy link
Owner

This is a general Julia problem, I think. If packages A and B both define function f which isn't in Base, then these definitions might clash. I think you can always say A.f and B.f to disambiguate.

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