Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Training error : NaN with numeric values #84

Open
lucydjo opened this issue Jun 24, 2019 · 1 comment
Open

Training error : NaN with numeric values #84

lucydjo opened this issue Jun 24, 2019 · 1 comment

Comments

@lucydjo
Copy link

lucydjo commented Jun 24, 2019

Hi.

I try to learn to detect the gender of names.
The TrainingData looks like this

{ input: [ 2, 26, 11, 8, 13, 4 ], output: { h: 0, f: 1 } },
{ input: [ 2, 4, 17, 8, 18, 4 ], output: { h: 0, f: 1 } },
{ input: [ 2, 4, 18, 0, 8, 17, 4 ], output: { h: 1, f: 0 } },
{ input: [ 2, 26, 18, 0, 17 ], output: { h: 1, f: 0 } },
{ input: [ 2, 7, 0, 13, 19, 0, 11 ], output: { h: 0, f: 1 } },
{ input: [ 2, 7, 0, 13, 19, 26 ], output: { h: 0, f: 1 } },
{ input: [ 2, 7, 0, 17, 11, 8, 13, 4 ], output: { h: 0, f: 1 } },
{ input: [ 2, 7, 0, 17, 11, 14, 19 ], output: { h: 1, f: 0 } },

My code : https://gist.github.com/lucaspojo/1a4c7c848f18074ccd195eb8d7828b6a

Do you know what I'm doing wrong?

Thx!

@AlibekJ
Copy link

AlibekJ commented Jul 2, 2019

Try
{ input: [ 2, 26, 11, 8, 13, 4 ], output: [ 0, 1 ] }
or
{ input: { a: 2, b:26, c:11, d:8, e:13, f:4 }, output: { h:0, f:1 } }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants