code: public void learn(double[][] x, double y[]) {
          if (x.length != y.length) {
              throw new IllegalArgumentException(String.format("Input vector x of size %d not equal to length %d of y", x.length, y.length));
          }
  
          for (int i = 0; i < x.length; i++){
              learn(x[i], y[i]);
          }
      }
docs: Learn a new instance with online regression.
  @param x the training instances.
  @param y the target values.