2013/12/4 abhishek <abhish...@gmail.com>: > Hello everyone, > > Im familiar with the scikit-learn classifiers and have used them a lot of > times in some research. The problem I'm facing right now is my data is in > the form of numpy object array. > > For example X is: > > X = [ [1,2] [2,5] [[1,2],[3,4]], > [2,4] [54,52] [[11,22],[13,4]], > [1,23] [2,25] [[1,2],[3,4]] ] > > the labels are 0 and 1. > > Is there any sklearn classifier which will work on this type of data? If not > are there any other libraries that can handle this kind of data?
All scikit-learn models expect homogeneous features (e.g. a 2D array with shape (n_samples, n_features)). You have to flatten your descriptors. How to do that depends on the feature "meaning" and the problem you are trying to solve. In particular integers don't have a meaning per se: they can encode categorical values, ordinal values or absolute numerical values. List of integers could encode disjunction of categorical values if individual element describe categorical variables. Have a look at: http://scikit-learn.org/stable/modules/feature_extraction.html if you are not familiar with what I mean by categorical values. -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general