Code Monkey home page Code Monkey logo

neural-network's Issues

Reset Weights...

Why $n->initWeights();
Every Epoch reset weights ??? Why ??
Reset weights cause Network initialize from new.

And loss previous worked !!

input and output

I can't understand if the input values must be between 0 and 1 or between -1 and +1 or... ? can you help me?

derivativeActivation($value)

protected function activation($value) {
    return tanh($value);
    // return (1.0 / (1.0 + exp(- $value)));
}
protected function derivativeActivation($value) {
    $tanh = tanh($value);
    return 1.0 - $tanh * $tanh;
    //return $value * (1.0 - $value);
}

I don't get it. Either
derivativeActivation should return 1.0 - $value * $value;
or the comment below for sigmoid should read
//return activation($value) * (1.0 - activation($value));

After load

I am not sure understanding the load portion, after saving and loading how to compute? Also how to get output of test data then?

XOR Problem

I am not sure if this is an issue or not but..

The following code:
$n->addTestData(array (-1, -1, 1), array (-1));
$n->addTestData(array (-1, 1, 1), array ( 1));
$n->addTestData(array ( 1, -1, 1), array ( 1));
$n->addTestData(array ( 1, 1, 1), array (-1));

Should this not be:
$n->addTestData(array (-1, -1, 0), array (-1));
$n->addTestData(array (-1, 1, 1), array ( 1));
$n->addTestData(array ( 1, -1, 1), array ( 1));
$n->addTestData(array ( 1, 1, 0), array (-1));

If not, what is the purpose of the third variable here if not the classification? If this third variable is not the classification (expected result) then how do you train this NN?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.