Hi Tom,

recently I saw the arff-package in pypi. Seems working.

import arff
import numpy as np

barray = []
for row in arff.load('/home/chris/tools/weka-3-7-6/rd54_train.arff'):
     barray.append(list(row))

nparray = np.array(barray)
print nparray.shape
(4940, 56)

HTH
Christian

> I’m trying to load up an ARFF (Weka-style .arff) so I can use it with 
> sklearn’s classifiers. I found scipy’s arff_load function, but getting it 
> into numpy arrays of data and targets is nontrivial.  Is there a facility for 
> doing this (semi-)automatically?
>
> I looked through the ./sklearn/datasets directory and I did some google 
> searches but nothing obvious is uncovered.
>
> Thanks,
> -Tom
>
>
> ------------------------------------------------------------------------------
> 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_d2d_feb
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general


------------------------------------------------------------------------------
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_d2d_feb
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to