src/step.js
function matrixFunction(data, evaluatedData) {
  const m = data.x.length;

  var ans = new Array(m);

  for (var point = 0; point < m; point++) {
    ans[point] = [data.y[point] - evaluatedData[point]];
  }

  return new Matrix(ans);
}
function matrixFunction(data, evaluatedData) {
  const m = data.x.length;

  var ans = new Array(m);

  for (var point = 0; point < m; point++) {
    ans[point] = [data.y[point] - evaluatedData[point]];
  }

  return new Matrix(ans);
}
function matrixFunction ( data , evaluatedData ) { const m = data . x . length ; var ans = new Array ( m ) ; for ( var point = 0 ; point < m ; point ++ ) { ans [ point ] = [ data . y [ point ] - evaluatedData [ point ] ] ; } return new Matrix ( ans ) ; }
Matrix function over the samples
@ignore
@param {{x:Array<number>, y:Array<number>}} data - Array of points to fit in the format [x1, x2, ... ], [y1, y2, ... ]
@param {Array<number>} evaluatedData - Array of previous evaluated function values
@return {Matrix}
Matrix function over the samples