2012/5/31 Lars Buitinck :
> 2012/5/31, Mathieu Blondel :
>> Sheila's question made me realize that we could have returned Bunch objects
>> in load_svmlight_file(). Not sure if it's worth breaking the API just for
>> that, though.
>
> Bunches are mostly useful when there are target names as well as
2012/5/31, Mathieu Blondel :
> Sheila's question made me realize that we could have returned Bunch objects
> in load_svmlight_file(). Not sure if it's worth breaking the API just for
> that, though.
Bunches are mostly useful when there are target names as well as
indices, for classifiers that don'
On Thu, May 31, 2012 at 7:58 PM, Sheila the angel wrote:
> Thanks Peter,
> it helps. But just wondering why load_svmlight_file() gives sparse matrix
> (CSR format) and a numpy array!!
> Is there any other way to use load_svmlight_file() return object directly
> for analysis (without using X_train
2012/5/31, Sheila the angel :
> it helps. But just wondering why load_svmlight_file() gives sparse matrix
> (CSR format) and a numpy array!!
Because this format is commonly used to exchange sparse matrices that
are too large to fit in NumPy arrays.
> Is there any other way to use load_svmlight_fi
Hi Sheila.
I think Peter got the right answer: load_svmlight_File yields a sparse Matrix
that you need to convert to an Array First.
Cheers, andy
--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
Sheila the angel schrieb:
Hi Andreas,
there is no difference bet
Thanks Peter,
it helps. But just wondering why load_svmlight_file() gives sparse matrix
(CSR format) and a numpy array!!
Is there any other way to use load_svmlight_file() return object directly
for analysis (without using X_train =X_train.toarray() )
On Wed, May 30, 2012 at 7:24 PM, Peter Pretten
Hi Andreas,
there is no difference between two data sets (except scaling).
But that is not a issue. Whenever I try to read data from libsvm format
file using function load_svmlight_file("file_name") it gives me object
which is different then default in tutorials.
for example in tutorial-
http://sci
Sheila,
``load_svmlight_file`` gives you a sparse matrix (CSR format) and a
numpy array.
You can convert the CSR matrix to a numpy array using::
X_train = X_train.toarray()
Please check if X_train.shape == iris.data.shape.
Hope this helps!
best,
Peter
2012/5/30 Sheila the angel :
> Hi all
Hi Sheila.
It would help if you could say what the difference between the two
datasets is.
Given the name "iris.scale" I would assume that it is somehow scaled,
either using zero mean, unit variance, between 0 and 1 or l2 normalized.
Have you tried using Scaler on the data to see what you get?
Hi all,
I am trying to read libsvm format data 'iris.scale' (from
http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/iris.scale) as
from sklearn.datasets import load_svmlight_file
X_train, y_train = load_svmlight_file('iris.scale')
I thought this will give same format as
from skle
10 matches
Mail list logo