Libraries for browser-based mathematics, e.g. for browser-based machine learning ranked in descending order of viability:
- weblas does GPU-accelerated mathematics and is used in hip projects such as keras-js.
- ndarray also used in keras-js.
This looks genuinely amazing in terms of functionality and even includes native support for worker threads and concurrency. However… it is lacking modern web wrappings such as npm packaging etc, so is not convenient to use from e.g. webpack.
Efficient, high-performance linear algebra library for node.js and browsers.
This is a low-level algebra library which supports basic vector and matrix operations, and has been designed with machine learning algorithms in mind.
Simple, expressive, chainable API. Array implementation with performance optimizations. Enhanced floating point precision if needed. Comprehensive unit tests. Works in node.js and browsers. Small: ~1 KB minified and gzipped.
- sylvester the original, but predates much modern optimisation such as native arrays and asm.js
a self-contained C library for Levenberg-Marquardt least-squares minimization and curve fitting
linalg uses native arrays because of their speed.
I needed a performance focused linear algebra module for visualizing data in 10+ dimensions, and implementing machine learning algorithms. I quickly learned that naive solutions to linear algebra operations can produce numerical errors so significant they are utterly useless for anything other than casual playtime. After that, I prioritized correctness over performance.
Untouched since released and small community, which is sad because the code looks solid.
- numeric looks polished but has been untouched for 2 years
- jmat is an actively developed complex matrix library, but we would probably prefer speed to complex number support.
- random variables can be simulated easily using the probability distributions library