code: public void setRegularization(double regularization)
      {
          if(Double.isNaN(regularization) || Double.isInfinite(regularization) || regularization <= 0)
              throw new ArithmeticException("Regularization must be a positive constant, not " + regularization);
          this.regularization = regularization;
      }
docs: Sets the amount of regularization to apply. The regularization must be a
  positive value
  @param regularization the amount of regularization to apply