code: private static double dot(double[] x, double[] w) {
          int i = 0;
          double dot = 0.0;
  
          for (; i < x.length; i++) {
              dot += x[i] * w[i];
          }
  
          return dot + w[i];
      }
docs: Returns the dot product between weight vector and x (augmented with 1).