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

[BUG] LogisticRegression Final Cross Entropy : NaN #2

Open
tusharmath opened this issue Feb 27, 2015 · 0 comments
Open

[BUG] LogisticRegression Final Cross Entropy : NaN #2

tusharmath opened this issue Feb 27, 2015 · 0 comments

Comments

@tusharmath
Copy link

In the following scenario we are getting an invalid (NaN) value for final cross entropy

var dnn = require('dnn');
// Training set
var x = [
    [0, 1],
    [0, 1],
    [0, 1],
    [1, 0],
    [1, 0],
    [1, 0],
];
var y = [
    [1],
    [1],
    [1],
    [1],
    [1],
    [1]
];

var lrClassifier = new dnn.LogisticRegression({
    'input': x,
    'label': y,
    'n_in': 2,
    'n_out': 1
});

// lrClassifier.set('log level', 0); // 0 : nothing, 1 : info, 2 : warning.
lrClassifier.train({});

x = [
    [0, 0],
    [0, 0],
    [0, 0],
    [1, 1],
    [1, 1],
    [1, 1],
];

console.log("Result : ", lrClassifier.predict(x));
@tusharmath tusharmath changed the title LogisticRegression Final Cross Entropy : NaN [BUG] LogisticRegression Final Cross Entropy : NaN Mar 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant