0
파이썬에서 arff 라이브러리의 dump
명령을 사용하면 주어진 입력에 따라 arff 파일을 만들 수 있습니다. 명령 : 주어진 데이터에 대한파이썬에서 arff 라이브러리로 생성 된 arff 파일의 공칭 속성
@relation relation1
@attribute age real
@attribute hairColor string
@data
10,0.2,black
22,10,yellow
30,2,black
:
arff.dump("outputDir", data, relation="relation1",
names=['age, fatRatio, hairColor'])
는 다음 arff를 얻을 수
data = [[10,0.2,'black'],[22,10,'yellow'],[30,2,'black']]
내 질문은 : 나는 hairColor
에 원하는 관련 메커니즘을 통지하는 방법 공칭 속성, 즉 내 arff 헤더가 다음과 같아야합니다.
@relation relation1
@attribute age real
@attribute hairColor **nominal**
@data
...
,