protected double findMaxLambdaGaussian(double[][][] x, double[] rTrain, double[] gradient) {
		double mean = 0;
		if (fitIntercept) {
			mean = OptimUtils.fitIntercept(rTrain);
		}
		double maxLambda = 0;
		for (double[][] block : x) {
			computeGradient(block, rTrain, gradient);
			double t = Math.sqrt(StatUtils.sumSq(gradient, 0, block.length)) / Math.sqrt(block.length);
			if (t > maxLambda) {
				maxLambda = t;
			}
		}
		if (fitIntercept) {
			VectorUtils.add(rTrain, mean);
		}
		return maxLambda;
	}