quinngroup / fergus-ssl

Python implementation of the Rob Fergus semi-supervised learning algorithm.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error after fit method call

mgadgil09 opened this issue · comments

Trying to pass the moons dataset of 100 samples to fit method as input in the form of X(100,2) as datapoints and Y(100,) as labels such that Y has 2 entries with two labels 0 and 1 and rest 98 have labels -1 which means unlabeled.
Getting following error:

fp.fit(arrX,arrY)
Traceback (most recent call last):
File "", line 1, in
File "", line 101, in fit
File "/home/madhura/.local/lib/python2.7/site-packages/sklearn/mixture/gmm.py", line 598, in fit
self._fit(X, y)
File "/home/madhura/.local/lib/python2.7/site-packages/sklearn/mixture/gmm.py", line 469, in _fit
estimator=self)
File "/home/madhura/.local/lib/python2.7/site-packages/sklearn/utils/validation.py", line 380, in check_array
% estimator_name)
ValueError: GMM expects at least 2 samples provided in a 2 dimensional array-like input

It looks like the GMM fit method is crashing: it's expecting "at least 2 samples provided in a 2 dimensional array-like input". Look at what is being passed to the GMM method.