code: public void setLambda(double lambda)
      {
          if(Double.isInfinite(lambda) || Double.isNaN(lambda) || lambda <= 0)
              throw new ArithmeticException("A positive amount of regularization must be performed");
          this.lambda = lambda;
      }
docs: Sets the regularization constant used for learning. The regularization
  must be positive, and the learning rate is proportional to the
  regularization value. This means regularizations very near zero will
  take a long time to converge.
  
  @param lambda the regularization to apply