GaussianMixtures.jl
                                
                                 GaussianMixtures.jl copied to clipboard
                                
                                    GaussianMixtures.jl copied to clipboard
                            
                            
                            
                        Weights Function Does Not Exist
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.
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.
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
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.