This is the source code for Robert Plummer's: 'Neural networks in JavaScript' course on Scrimba for Brain.js. Some files include bonus question answers and others don't.
'index.html' and 'counter.html' are the same, they just use different versions of Brain.js:
- 'index.html': Version 1.2.6.
- 'counter.html': Version 1.6.0.
'normalization.html' is used for the 'stockPredictor.js' file.
- Online Course: Neural networks in JavaScript
The code is meant to be run in a browser, so you just need an online HTML, JavaScript, CSS compiler such as:
The output will be in the console, not in the HTML page itself.
$ git clone https://github.com/xXH4CKST3RXx/JS-Neural-Networks-Course.git
Install Brain.js locally:
If you can, install brain.js
with npm:
npm install brain.js
<script src="//unpkg.com/brain.js"></script>
Download the latest brain.js for browser
Brain.js
depends on a native module headless-gl
for gpu support. In most cases installing brain.js
from npm should just work. However, if you run into problems, this means that prebuilt binaries are not able to download from github reporsitories and you might need to build it yourself. If you would like, you can also install an earlier version of Brain.js
if the installation fails.
Please make sure the following dependencies are installed and up to date and then run:
npm rebuild
- Python 2.7
- A GNU C++ environment (available via the
build-essential
package onapt
) - libxi-dev
- Working and up to date OpenGL drivers
- GLEW
- pkg-config
sudo apt-get install -y build-essential libxi-dev libglu1-mesa-dev libglew-dev pkg-config
- Python 2.7
- Microsoft Visual Studio
- d3dcompiler_47.dll should be in c:\windows\system32, but if isn't then you can find another copy in the deps/ folder
$ npm install
This will install NPM packages.
$ npm start
This will run the Web App.
Once its deployed go to http://localhost:3000/ or wherever the WebApp is served.
![]() |
![]() |
![]() |
---|
Robert Plummer © | Per Harald Borgen ©
Licensed under the MIT License.
Thanks to all the people who have improved this repository!
Made with contributors-img.
All the source code was created by Robert Plummer, this repository is just a way to get access to the code.