On Mon, Nov 19, 2012 at 6:01 AM, Leon Palafox <[email protected]> wrote:

> Hello,
>
> I've been working with some sparse matrices that have the libSVM format.
> They were only on LibSVM format, but where not binary training data, we
> just choose that format for convenience.
>
> I was trying to pass those matrices to a GMM to compare clustering with
> K-means on these datasets.
>
> So I get an X matrix, which is the output from:
>
> X,y=load_svmlight_file(filename)
> ##Then I transpose
> A=X.T
> GMM=mixture.GMM(n_components=2)
> GMM.fit(A)
>
> And here is where I have an error (that I do not have with K means) that
> the X[0].shape < self.n_components
>
>
> Any idea on why is this happening?
>

Not related to the error, but one thing you should stop to think about: if
your data is very sparse, a mixture of Gaussians is almost certainly the
wrong model. You are wholesale violating the modeling assumptions by having
significant concentrations of each feature at exactly zero. GMMs really
only make any sense for dense data.

David
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to