code: public static double squaredLoss(double[] x, double[] y, double w_0, double w_1) {
          double sum = 0;
          for (int j = 0; j < x.length; j++) {
              sum += Math.pow((y[j] - (w_1 * x[j] + w_0)), 2);
          }
          return sum;
      }
docs: This will return the squared loss of the given
  points
  @param x the x coordinates to use
  @param y the y coordinates to use
  @param w_0 the first weight
  
  @param w_1 the second weight
  @return the squared loss of the given points