* @param isSparse <code>true</code> if the training set is treated as sparse.
	 * @param groups the groups of variables.
	 * @param maxNumIters the maximum number of iterations.
	 * @param lambda the lambda.
	 * @return a group-lasso penalized regressor.
	 */
	public GLM buildGaussianRegressor(Instances trainSet, boolean isSparse, List<int[]> groups, int maxNumIters, double lambda) {
		if (isSparse) {
			SparseDataset sd = getSparseDataset(trainSet, true);
			SparseDesignMatrix sm = createDesignMatrix(sd, groups);
			double[] cList = sd.cList;

			GLM glm = buildGaussianRegressor(sm.group, sm.indices, sm.values, sd.y, maxNumIters, lambda);
			
			double[] w = glm.coefficients(0);
			for (int j = 0; j < cList.length; j++) {
				int attIndex = sd.attrs[j];
				w[attIndex] *= cList[j];
			}

			return glm;
		} else {
			DenseDataset dd = getDenseDataset(trainSet, true);
			DenseDesignMatrix dm = createDesignMatrix(dd, groups);
			double[] cList = dd.cList;

			GLM glm = buildGaussianRegressor(dm.groups, dm.x, dd.y, maxNumIters, lambda);

			double[] w = glm.coefficients(0);
			for (int j = 0; j < cList.length; j++) {
				int attIndex = dd.attrs[j];
				w[attIndex] *= cList[j];
			}

			return glm;
		}
	}