ml5js / ml5-library

Friendly machine learning for the web! 🤖
https://ml5js.org
Other
6.49k stars 901 forks source link

The data in the loading JSON example is incorrect #1160

Open ThatCoolCoder opened 3 years ago

ThatCoolCoder commented 3 years ago

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"}
] }
lindapaiste commented 7 months ago

@QuinnHe @MOQN We have this mistake in the new v2 documentation and should fix it there as well, in the file https://github.com/ml5js/ml5-website-v02-docsify/blob/main/docs/reference/neural-network.md

QuinnHe commented 7 months ago

Thanks Linda! Will update it :)

Best, Quinn

On Tue, Mar 26, 2024 at 10:11 AM Linda Paiste @.***> wrote:

@QuinnHe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_QuinnHe&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=lj4eKD-Kd9ebWfo4Ezdxjg&m=T4_4XbUFljvAEVfUNPDvKzIaFi1CnP6VgU8BYoF69W_RClK06whI7dg35EOr_ohW&s=i5WdmGOYcQyBxXX5iJkO_S_PtvOgvaTDiB8LinhbsTM&e= @MOQN https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_MOQN&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=lj4eKD-Kd9ebWfo4Ezdxjg&m=T4_4XbUFljvAEVfUNPDvKzIaFi1CnP6VgU8BYoF69W_RClK06whI7dg35EOr_ohW&s=mVch6TaKOfphlMFNak9u5Ry-nqXgzZZ5fB6CG0phHPY&e= We have this mistake in the new v2 documentation and should fix it there as well, in the file https://github.com/ml5js/ml5-website-v02-docsify/blob/main/docs/reference/neural-network.md https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ml5js_ml5-2Dwebsite-2Dv02-2Ddocsify_blob_main_docs_reference_neural-2Dnetwork.md&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=lj4eKD-Kd9ebWfo4Ezdxjg&m=T4_4XbUFljvAEVfUNPDvKzIaFi1CnP6VgU8BYoF69W_RClK06whI7dg35EOr_ohW&s=TQh2p8npd-0gBsoDv4F_pb9s9PjR2Ij-nxpWOIpVOK4&e=

— Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ml5js_ml5-2Dlibrary_issues_1160-23issuecomment-2D2020699052&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=lj4eKD-Kd9ebWfo4Ezdxjg&m=T4_4XbUFljvAEVfUNPDvKzIaFi1CnP6VgU8BYoF69W_RClK06whI7dg35EOr_ohW&s=wdyuiVlE0R7mPMozk-yDMIpFHyl6Wo_dILRd-u6eA4c&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AHS7MLJETYPA2WB5NX76FX3Y2GFZHAVCNFSM4ZN3HHYKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBSGA3DSOJQGUZA&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=lj4eKD-Kd9ebWfo4Ezdxjg&m=T4_4XbUFljvAEVfUNPDvKzIaFi1CnP6VgU8BYoF69W_RClK06whI7dg35EOr_ohW&s=4StBZjP8qIUNk1IF7kAtn0rMehHp4nMYgrjDpWnLRnM&e= . You are receiving this because you were mentioned.Message ID: @.***>

MOQN commented 7 months ago

@lindapaiste Thank you for letting us know! We will revise the whole documentation by Tuesday, April 2nd, and ask you all to review it.