2012/11/1  <paul.czodrow...@merckgroup.com>:
> I was trying to do a train/test set split:
> from sklearn.cross_validation import train_test_split
> X_train, X_test, y_train, y_test = train_test_split(dataDescrs,
> data_activities, test_size=.4)
>
> However, I found it strange that "X_train.shape" gives (373, 177) -
> shouldn't be the second bit be the number of classes, i.e. 2?

[snip]

> 177 corresponds, BTW, to the number of features..

And that's exactly what this is supposed to represent. The number of
classes is len(np.unique(y)).

-- 
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to