ml5js/ml5-library

The data in the loading JSON example is incorrect

Open

#1,160 创建于 2021年3月19日

在 GitHub 查看
 (3 评论) (4 反应) (0 负责人)JavaScript (905 fork)batch import
documentationgood first issue

仓库指标

Star
 (6,136 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Just below this heading in your reference, there is an example showing how to load data as JSON. This is the example data that is provided to show the format:

{"data": [
  {"xs": {"avg_temperature":20, "humidity": 0.2}, "ys": {"rained": "no"}},
  {"xs": {"avg_temperature":30, "humidity": 0.9}, "ys": {"rained": "yes"}}
] }

However, when testing loading JSON, I found that this data format was not correct. For every item, I would get an error like this: the input label avg_temperature does not exist at row 0. After some experimentation, I found that the data format should instead be something like this:

{"data": [
    {"avg_temperature":20, "humidity": 0.2, "rained" : "no"},
    {"avg_temperature":30, "humidity": 0.9, "rained": "yes"}
] }

贡献者指南