Giter Club home page Giter Club logo

Comments (1)

Ealenn avatar Ealenn commented on May 18, 2024

I tried to normalize the Input (related to #712)
My issue probably come from this, because, I now get different results, very similar but different.

Node Example
  const brain = require("brain.js");
  const net = new brain.NeuralNetwork({});

  net.train([
  {
    input: [ 0.1522017 ],
    output: { '8': 1, '14': 1, '16': 1, '21': 1, '24': 1 }
  },
  {
    input: [ 0.1322017 ],
    output: { '5': 1, '16': 1, '18': 1, '39': 1, '44': 1 }
  },
  {
    input: [ 0.1122017 ],
    output: { '1': 1, '15': 1, '17': 1, '29': 1, '37': 1 }
  },
  {
    input: [ 0.822017 ],
    output: { '17': 1, '19': 1, '33': 1, '37': 1, '40': 1 }
  },
  {
    input: [ 0.622017 ],
    output: { '19': 1, '30': 1, '31': 1, '33': 1, '40': 1 }
  },
  {
    input: [ 0.422017 ],
    output: { '1': 1, '22': 1, '32': 1, '35': 1, '37': 1 }
  },
  {
    input: [ 0.122017 ],
    output: { '9': 1, '17': 1, '24': 1, '45': 1, '46': 1 }
  },
  {
    input: [ 0.3012017 ],
    output: { '4': 1, '22': 1, '23': 1, '32': 1, '40': 1 }
  },
  {
    input: [ 0.2812017 ],
    output: { '2': 1, '5': 1, '6': 1, '10': 1, '26': 1 }
  },
  {
    input: [ 0.2512017 ],
    output: { '4': 1, '10': 1, '19': 1, '20': 1, '28': 1 }
  },
  {
    input: [ 0.2312017 ],
    output: { '5': 1, '15': 1, '17': 1, '31': 1, '49': 1 }
  },
  {
    input: [ 0.2112017 ],
    output: { '8': 1, '31': 1, '32': 1, '36': 1, '40': 1 }
  },
  {
    input: [ 0.1812017 ],
    output: { '5': 1, '29': 1, '34': 1, '47': 1, '48': 1 }
  },
  {
    input: [ 0.1612017 ],
    output: { '14': 1, '26': 1, '32': 1, '35': 1, '37': 1 }
  },
  {
    input: [ 0.1412017 ],
    output: { '16': 1, '18': 1, '19': 1, '37': 1, '44': 1 }
  },
  {
    input: [ 0.1112017 ],
    output: { '13': 1, '19': 1, '22': 1, '28': 1, '30': 1 }
  },
  {
    input: [ 0.912017 ],
    output: { '2': 1, '6': 1, '16': 1, '21': 1, '42': 1 }
  },
  {
    input: [ 0.712017 ],
    output: { '21': 1, '22': 1, '24': 1, '33': 1, '46': 1 }
  },
  {
    input: [ 0.412017 ],
    output: { '16': 1, '17': 1, '26': 1, '36': 1, '38': 1 }
  },
  {
    input: [ 0.212017 ],
    output: { '11': 1, '19': 1, '31': 1, '38': 1, '40': 1 }
  },
  {
    input: [ 0.31122016 ],
    output: { '4': 1, '33': 1, '43': 1, '45': 1, '49': 1 }
  },
  {
    input: [ 0.28122016 ],
    output: { '15': 1, '16': 1, '34': 1, '35': 1, '39': 1 }
  },
  {
    input: [ 0.26122016 ],
    output: { '3': 1, '16': 1, '27': 1, '29': 1, '37': 1 }
  },
  {
    input: [ 0.24122016 ],
    output: { '7': 1, '20': 1, '22': 1, '35': 1, '48': 1 }
  },
  {
    input: [ 0.21122016 ],
    output: { '17': 1, '22': 1, '25': 1, '39': 1, '42': 1 }
  },
  {
    input: [ 0.19122016 ],
    output: { '3': 1, '17': 1, '26': 1, '40': 1, '41': 1 }
  },
  {
    input: [ 0.17122016 ],
    output: { '2': 1, '5': 1, '13': 1, '16': 1, '32': 1 }
  },
  {
    input: [ 0.14122016 ],
    output: { '9': 1, '10': 1, '14': 1, '44': 1, '46': 1 }
  },
  {
    input: [ 0.12122016 ],
    output: { '6': 1, '11': 1, '12': 1, '14': 1, '36': 1 }
  },
  {
    input: [ 0.10122016 ],
    output: { '24': 1, '27': 1, '28': 1, '41': 1, '43': 1 }
  },
  {
    input: [ 0.7122016 ],
    output: { '2': 1, '5': 1, '7': 1, '44': 1, '45': 1 }
  },
  {
    input: [ 0.5122016 ],
    output: { '6': 1, '23': 1, '26': 1, '29': 1, '30': 1 }
  },
  {
    input: [ 0.3122016 ],
    output: { '4': 1, '11': 1, '13': 1, '38': 1, '44': 1 }
  }
  ]);

  console.log(net.run([0.23022016]));
  console.log(net.run([0.11011995]));
  console.log(net.run([0.08122023]));

from brain.js.

Related Issues (20)

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.