Machine Learning in the Browser

Machine Learning in the Browser means:

Math in the Browser

Math.js is an extensive math library for JavaScript and Node.js.

Math.js is powerful and easy to use. It comes with a large set of built-in functions, a flexible expression parser, and solutions to work with many data types like numbers, big numbers, complex numbers, fractions, units, arrays, and matrices.

Machine Learning in the Browser

Brain.js is a GPU accelerated neural networks in JavaScript for Browsers and Node.js.

Brain.js is simple to use. You do not need to know neural networks in details to work with Brain.js.

Brain.js provides multiple neural network implementations as different neural nets can be trained to do different things well.

Plotting in the Browser

Here is a list of some JavaScript libraries to use for both Machine Learning graphs and other HTML charts:

Plotting Equations

Scatter

Draw Line

Plotting Values

Scatter

Draw Lines

plotExpression("lines"); plotXY("lines"); function plotExpression(type) { try { // Compile expression const expr = math.compile(document.getElementById("equation").value); // Evaluate values of x const xArray = math.range(0, 10, 0.2).toArray(); const yArray = xArray.map(function (x) {return expr.evaluate({x:x})}); // Display the plot plotXYArrays("myPlot11", type, xArray, yArray); } catch (err) { document.getElementById("myPlot11").innerHTML = err; } } function plotXY(type) { let xArray = document.getElementById("xvalues").value.split(','); let yArray = document.getElementById("yvalues").value.split(','); plotXYArrays("myPlot21", type, xArray, yArray); } function plotXYArrays(id, type, xArray, yArray) { let mode = "lines"; let graph = "scatter"; if (type == "scatter") {mode = "markers"} if (type == "bars") {graph = "bar"} Plotly.newPlot(id, [{x:xArray, y:yArray, mode:mode, type:graph}]); }