Machine Learning in JavaScript

Per trying out various ML libraries that work in the browser.
    import { DATA } from './dataset';
    import { getAccuracy } from './getAccuracy';
    
    const SPLIT = 99;
    const trainData = DATA.slice(0, SPLIT);
    const testData = DATA.slice(SPLIT + 1);
    
    // https://github.com/BrainJS/brain.js
    //create a simple feed forward neural network with backpropagation
    const net = new brain.NeuralNetwork({
      activation: 'sigmoid', // activation function
      hiddenLayers: [6],
      iterations: 200,
      learningRate: 0.0001 // global learning rate, useful when training using streams
    // create the network
    const { Layer, Network } = window.synaptic;
    
    var inputLayer = new Layer(2);
    var hiddenLayer = new Layer(3);
    var outputLayer = new Layer(1);
    
    inputLayer.project(hiddenLayer);
    hiddenLayer.project(outputLayer);
    
    var myNetwork = new Network({
    	input: inputLayer,
    	hidden: [hiddenLayer],
    	output: outputLayer