For me it works fine.
Cheers, Christian
> test.arff
@relation 'test'
@attribute v1 {blonde,blue}
@attribute v2 numeric
@attribute v3 numeric
@attribute class {yes,no}
@data
blonde,17.2 ,1,yes
blue,27.2,2,yes
blue,18.2,3,no
< end test.arff
barray
[['blonde', 17.2, 1.0, 'yes'],
['blue', 27.2, 2.0, 'yes'],
['blue', 18.2, 3.0, 'no']]
> Thanks for your response, Christian. I experimented with the package. FYI,
> there’s a problem with the pypi arff reader. The package claims to handle
> numbers but it seems to encode everything (including numbers) as strings,
> like this:
>
> [['blonde' '17.2' '1' 'yes']
> ['blue' '27.2' '2' 'yes']
> ['blue' '18.2' '3' ’no’]]
>
> I’ve been using Lars Buitinck’s arff reader (thanks Lars!) which does
> numerical encodings, which are necessary for most of scikits-learn.
>
> Regards,
> -Tom
>
>
> On Mar 5, 2013, at 7:34 AM, Christian <[email protected]> wrote:
>
>> 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)
>
>
> ------------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general