如何使用matlab将json字符串转换为矩阵进行训练?

时间:2015-11-27 15:10:23

标签: json matlab matrix

我有Json数据,我想在分类中使用它。

数据样本:

{"reviewerID": "AKM1MP6P0OYPR", "asin": "0132793040", "reviewerName": "Vicki  Gibson \"momo4\"", "helpful": [1, 1], "reviewText": "Corey Barker does a great job of explaining Blend Modes in this DVD. All of the Kelby training videos are great but pricey to buy individually. If you really want bang for your buck just subscribe to Kelby Training online.", "overall": 5.0, "summary": "Very thorough", "unixReviewTime": 1365811200, "reviewTime": "04 13, 2013"}

我应该在训练中使用它,但我不知道如何处理它。我习惯于像虹膜数据集(矩阵)这样的数据类型。

像这样:

data =

5.1000    3.5000    1.4000    0.2000
4.9000    3.0000    1.4000    0.2000
4.7000    3.2000    1.3000    0.2000
4.6000    3.1000    1.5000    0.2000

我需要做什么让它像这种形式?通过这种形式,我的意思是矩阵,我不是指数字。

我试图解析json字符串,我得到了这个结果:

data = 

Columns 1 through 5

[1x1 struct]    [1x1 struct]    [1x1 struct]    [1x1 struct]    [1x1 struct]

 Columns 6 through 9

[1x1 struct]    [1x1 struct]    [1x1 struct]    [1x1 struct]

0 个答案:

没有答案