You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but after .save() and .load() to reveal same prediction I need to set k: Optional. Number. to 1 and by hands look all keys in confidencesByLabel to find predicted label, or used Object.keys(result.confidencesByLabel)[result.label] without setting k: Optional. Number. also give satisfaction
I checked knnClassifier and it looks like after .save()labelToClassId inside it disappears - I think this is root of my problem! exampleShape also disappears, maybe other data also have differences, extra check needed...
β Step 2: Screenshots or Relevant Documentation πΌ
Dear ml5 community,
I'm submitting a new issue. Please see the details below.
β Step 1: Describe the issue π
KNNClassifier result after .save() and .load() in .classify() :
classIndex becomes undefined and label becomes number
somehow before .save() and .load() on .addExample() stage - I getting result I want with .classify() in label key as expected
but after .save() and .load() to reveal same prediction I need to set k: Optional. Number. to 1 and by hands look all keys in confidencesByLabel to find predicted label, or used Object.keys(result.confidencesByLabel)[result.label] without setting k: Optional. Number. also give satisfaction
I checked knnClassifier and it looks like after .save() labelToClassId inside it disappears - I think this is root of my problem! exampleShape also disappears, maybe other data also have differences, extra check needed...
β Step 2: Screenshots or Relevant Documentation πΌ
results before .save() - https://i.imgur.com/UrKYtE1.png
results after .save() and .load() - https://i.imgur.com/sx3JJpg.png
knnClassifier before/after .save() and .load() - https://i.imgur.com/fhANlyb.png
β Describe your setup π¦
used ml5.js version - https://unpkg.com/ml5@latest/dist/ml5.min.js
saved model - https://assets.editor.p5js.org/6425ed4ef6508e001a82ec9f/779262d9-d5be-4d32-ae82-8c835a3d1fe4.json
The text was updated successfully, but these errors were encountered: