public double repeatNFoldCrossValidation(Matrix features, Matrix labels, int n, int repetitions){

        double mseTotal = 0.0;
        long seed = System.currentTimeMillis();
        for (int i = 0; i < repetitions; i++) {
            Matrix shuffledFeatures = features.shuffle(new Random(seed));
            Matrix shuffledLabels = labels.shuffle(new Random(seed));
            mseTotal += this.nFoldCrossValidation(shuffledFeatures, shuffledLabels, n);
        }

        return mseTotal / repetitions;
    }