项目作者: Thoughtscript

项目描述 :
WIP TensorFlowJS Stock Prediction
高级语言: JavaScript
项目地址: git://github.com/Thoughtscript/x_team_tensorflow_js.git
创建时间: 2018-06-13T00:00:42Z
项目社区:https://github.com/Thoughtscript/x_team_tensorflow_js

开源协议:

下载


x_team_tensorflow_js

WIP: X-Team TensorFlow.js Stock Prediction Example.

Presently only the Logic example is 100% - it includes all basic logic operations implemented in client-side TensorFlow.js RNN.

Examples

Logic training with 100 epochs:

100

Logic training with 1200 epochs:

1200

Installation and Set Up

Setup and installation instructions:

Linux

In order to improve performance and better leverage parallel, asynchronous, processes this example was rearchitected with most of the work put into the server.

We now make heavy use of the great npm libraries:

  1. tfjs.
  2. tfjs-node.
  3. tfjs-node-gpu.

And as a result of that, this example requires using Linux in order to achieve full functionality!

For NVM on Linux:

  1. #!/usr/bin/env bash
  2. echo "Updating OS"
  3. sudo apt-get update
  4. echo "Installing NVM"
  5. curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | bash
  6. echo "Installing Linux Dependencies"
  7. sudo apt-get install build-essentials

For NVM on Windows Linux Subsystem:

(This approach is recommended for running the app only!)

  1. See this great article for more!
  2. Access your Linux workspace directly in your usual Windows text-editor.

E.g. - Access this repo in Windows directory: C:\Users\MY_WINDOWS_USER\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_7...c\LocalState\rootfs\home\u\x_team_tensorflow_js

  1. If you run into an Error: EACCESS: permission denied issue during installation try:
  1. $ sudo chown -R u:p node_modules
  2. $ sudo chown -R u:p u/.nvm

Node and NPM

Setup instructions:

  1. $ npm install
  2. $ npm run start

Views:

  1. http://localhost:5555/logic
  2. http://localhost:5555/cnn
  3. http://localhost:5555/rnn

Licensing

MIT Licensed!

Shout Outs

To my knowledge this is perhaps one of the first 100% JavaScript Stock Prediction examples (either using a Recurrent Neural Net or a Convolutional Neural Net) and probably the first for TensorFlow.js:

  1. John Murphy’s outstanding pure-node implementation.
  2. karthikbadam’s Encog-based TimeFork.

Other great resources:

  1. TensorFlow’s Official CNN Article!
  2. Firdaouss Doukkali’s great introductory @phidaouss/convolutional-neural-networks-cnn-or-convnets-d7c688b0a207">article!
  3. A great full-stack example leveraging Python, PHP, and JavaScript.
  4. Special thanks to Zaid Alyafeai for several crystal-clear code samples!