了解 JSON 对象的格式及其与 ARFF 的关系。步骤出奇的简单。
使用 GUI 工具执行以下操作:
- 选择资源管理器选项
- 在预处理选项卡上选择打开文件
- 加载任何默认提供的 ARFF 文件
- 选择保存,然后您可以选择 JSON 扩展名
基本上每个 JSON 文件都必须具有:
{标题:{关系:,属性:[{},{}],数据:[{},{}]}}}
希望这可以帮助
{"houses":{
"relation":"house",
"attributes":{
"houseSize":["NUMERIC"],
"lotSize":
"bedrooms":
"granite":
"bathroom":
"sellingPrice":
},
"data":[
[3529,9191,6,0,0,205000 ],
[3247,10061,5,1,1,224900],
[4032,10150,5,0,1,197900 ],
[2397,14156,4,1,0,189900 ],
[2200,9600,4,0,1,195000],
[3536,19994,6,1,1,325000 ],
[2983,9365,5,0,1,230000]
]}}
这些属性可以指定更多信息,如下所示:
{"contact_lenses":{
"relation": "contact-lenses",
"attributes" : {
"age":["young", "pre-presbyopic", "presbyopic"],
"spectacle-prescrip":["myope", "hypermetrope"],
"astigmatism":["no", "yes"],
"tear-prod-rate":["reduced", "normal"],
"contact-lenses":["soft", "hard", "none"]
},
"data":[]
}
}