brainjs/train-stream — explained in plain English
Analysis updated 2026-07-20 · repo last pushed 2023-03-22
Train a brain.js neural network on a large CSV file by piping rows through a stream.
Train a sentiment classifier on customer interaction data without loading everything into memory.
Normalize or reformat data on the fly using a Transform stream before training.
Train LSTM recurrent networks on large sequential datasets using incremental streaming.
| brainjs/train-stream | 0labs-in/vision-link | arviahq/arvia | |
|---|---|---|---|
| Stars | 4 | 4 | 4 |
| Language | TypeScript | TypeScript | TypeScript |
| Last pushed | 2023-03-22 | — | — |
| Maintenance | Dormant | — | — |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 3/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires brain.js as a dependency and familiarity with its NeuralNetwork class and Node.js streams.
train-stream is a companion package for brain.js, a JavaScript library that lets you build and train neural networks in Node.js. The core problem it solves is training on large datasets that are too big to comfortably hold in memory all at once. Instead of loading every example into RAM before training begins, you feed data to the network incrementally through a stream. At a high level, the package provides a TrainStream class that you attach to an existing brain.js neural network. You write data to the stream piece by piece, and the network learns from it as it arrives. Three main things control the flow: the neural network itself, a "flood callback" that re-populates the stream for each training iteration, and a "done training callback" that fires when the network finishes. The README notes you can also use a Transform stream to normalize or reformat data before it reaches the network. The target user is a JavaScript or TypeScript developer already working with brain.js who needs to train on more data than memory allows. For example, if you have a large CSV file of customer interactions and want to train a model to classify sentiment, this stream lets you pipe rows through the network without loading the entire file at once. It works with brain.js's standard NeuralNetwork class as well as recurrent architectures like LSTM. The project is notably small and focused, providing just the streaming layer on top of brain.js rather than reimplementing the machine learning logic itself. The README is fairly minimal, covering initialization and the two main usage patterns, with an example file linked for further reference.
A small package that lets brain.js neural networks train on large datasets by streaming data in chunks, so you don't need to load everything into memory at once.
Mainly TypeScript. The stack also includes TypeScript, JavaScript, Node.js.
Dormant — no commits in 2+ years (last push 2023-03-22).
No license information is provided in the explanation, so usage terms are unknown.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.