src/transform/kernel-smooth/regression.js
function weight(kernel, bandwidth, x_0, x_i) {
  const arg = (x_i - x_0) / bandwidth;
  return kernel(arg);
}
function weight(kernel, bandwidth, x_0, x_i) {
  const arg = (x_i - x_0) / bandwidth;
  return kernel(arg);
}
function weight ( kernel , bandwidth , x_0 , x_i ) { const arg = ( x_i - x_0 ) / bandwidth ; return kernel ( arg ) ; }
calculates weight for i-th obs
calculates weight for i - th obs