demos icon indicating copy to clipboard operation
demos copied to clipboard

Some JavaScript works published as demos, mostly ML or DS

JavaScript Exhibits

Here are the list of JavaScript projects in this repo. I work on them during my free time. If you are interested to collaborate on working a cool JavaScript side project together, reach out to me, I will be happy to chat!

Depreciated

This repo has been decommissioned. But here are the updated repos:

Time Series Forecasting With TensorFlow.Js

Pull stock prices from online API and perform predictions using Recurrent Neural Network and Long Short-Term Memory (LSTM) with TensorFlow.js framework.

Demo | Code | Article

Packages dependencies:

  • @tensorflow/tfjs
  • @angular/common/http

Reinforcement Learning Value Function with Tic Tac Toe

Reinforcement learning algorithm for agents to learn the tic-tac-toe, using the value function. Train the agent to play tic-tac-toe, by having 2 agents play against each other through simulation. You can experiment by adjusting 2 parameters, 1) learning rate and 2) probability of exploration of each agent. After training, try playing against the agent.

Demo | Code | Article

Phrases Extraction And D3 Wordcloud

100% JavaScript solution to extracting ngrams from text and display high frequency in beautiful D3 wordcloud. Phrases (ngrams) extraction are done inside d3-wordcloud-phrases.js, there are a few params which you could tweak and edit stopwords list. Adjustments to wordcloud can be found in d3-wordcloud-wordcloud.js.

Demo | Code | Article

Packages dependencies:

  • d3
  • d3.layout.cloud

Sentence Similarity With TensorFlow.Js Sentence Encoder

Universal Sentence Encoder (Cer et al., 2018) is a language model that encodes text into fixed-length embeddings. It aims to convert sentences into semantically-meaningful dense real-valued vectors.

Demo | Code | Article

Packages dependencies:

  • @tensorflow/tfjs
  • @tensorflow-models/universal-sentence-encoder

Features

  • packages are shared among all the exhibits, reduces setup time and we can focus on building JavaScript projects
  • each project are separated as different app/components, this is neat

Install

With npm installed, run

$ npm install

That will install all the dependencies listed in package.json.

Usage

To start, simply run

$ npm start

This project is build on Angular, design styles are based on Material.