Re: [Scikit-learn-general] libsvm data support

2013-07-12 Thread Hakan
n != 0, :2] >> y = y_in[y_in != 0] I fixed that point to 150 samples each. >> n_sample = len(X) > > Don't do that on a sparse matrix. Either do: > > n_samples = X.shape(0) > > or > > X = X.toarray() > n_samples = len(X) Now it h

Re: [Scikit-learn-general] libsvm data support

2013-07-12 Thread Hakan
l size of new array must be unchanged"error pl.pcolormesh(XX, YY, Z > 0, cmap=pl.cm.Paired) pl.contour(XX, YY, Z, colors=['k', 'k', 'k'], linestyles=['--', '-', '--'], levels=[-.5, 0, .5]) pl.title(kern

Re: [Scikit-learn-general] libsvm data support

2013-07-12 Thread Hakan
svmlight_load. Thanks, Hakan On Fri, 12 Jul 2013 17:00:58 +0200 Andreas Mueller wrote: > Hi. > If you just want the iris dataset, you can get it using > "datasets.load_iris()" (and scale it with >StandardScaler). > The problem in your code is that load_svmlight_file >ret

Re: [Scikit-learn-general] libsvm data support

2013-07-12 Thread Hakan
e 5817, in scatter colors = mcolors.colorConverter.to_rgba_array(c, alpha) File "/usr/lib/pymodules/python2.7/matplotlib/colors.py", line 380, in to_rgba_array raise ValueError("Color array must be two-dimensional") ValueError: Color array must be two-dimensional

[Scikit-learn-general] libsvm data support

2013-07-12 Thread Hueseyin Hakan Pekmezci
Z.reshape(XX.shape) pl.pcolormesh(XX, YY, Z > 0, cmap=pl.cm.Paired) pl.contour(XX, YY, Z, colors=['k', 'k', 'k'], linestyles=['--', '-', '--'], levels=[-.5, 0, .5]) pl.title(kernel) pl.show() Many thanks,