Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Neural Network] Normalization issues when all values are the same #973

Open
joeyklee opened this issue May 16, 2020 · 3 comments
Open

[Neural Network] Normalization issues when all values are the same #973

joeyklee opened this issue May 16, 2020 · 3 comments

Comments

@joeyklee
Copy link
Contributor

Dear ml5 community,

I'm submitting a new issue. Please see the details below.

β†’ Step 1: Describe the issue πŸ“

Did you find a bug? Want to suggest an idea for feature?

  • Bug

Related to ml5js/ml5-website#154

It seems that if all the values of an input are the same, then the training fails. In some ways this makes sense that this would fail, but we definitely will need to handle such cases in a friendly way.

cc/ @yining1023

@hansvana
Copy link
Contributor

Thanks for the reply. Might this bug also affect another weird case I've noticed? If you have a classification task and the output is a column that only holds 0 or 1, or something that normalizes to just 0 or 1, the training won't run. If you replace 0 and 1 with 'no' and 'yes' the training runs fine.

demo here

Btw: if the output column is 0 or 1 neuralNetworkData.meta.outputUnits equals 1. If the output is 'no' or 'yes' outputUnits equals 2.

If this is not related, or if you'd like me to do provide some more data let me know.

@joeyklee
Copy link
Contributor Author

@hansvana - For classification tasks, the NN expects a string. In this case if you convert your 0 and 1 to String types, then your NN should behave as expected.

I think the first issue noted here is likely different. Thanks for bringing this up though!

@hansvana
Copy link
Contributor

hansvana commented Aug 18, 2020

@joeyklee Converting 0 and 1 to Strings does indeed work. However converting to "0" and "1" raises another interesting side effect: the 0's and 1's get reversed!

I made a simple sketch to illustrate this. As you can see 0 and 1 get reversed in the output XOR feature. Replacing "0" and "1" with "False" and "True" or "no" and "yes" works as a workaround, which solves the problem for me, but I just wanted to flag the problem.

Edit: Actually after some more research the problem seems to be not just with 0 and 1. I've opened a new issue at #1044

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Neural Network
  
To do
Development

No branches or pull requests

4 participants