private List<double[]> calculateStdMeasurementsForParam(
            int            numEntriesPerPreview,
            int            numParamValues,
            int            paramValue,
            List<double[]> meanParamMeasurements)
    {
        List<double[]> paramMeasurementsSquaredDiffSum = 
                new ArrayList<double[]>(numEntriesPerPreview);
        List<double[]> paramMeasurementsStd            = 
                new ArrayList<double[]>(numEntriesPerPreview);
        
        int numCompleteFolds = 0;
        
        // sum up squared differences between measurements and mean values
        for (PreviewCollection<Preview> foldPreview : 
             this.origMultiRunPreviews.subPreviews) 
        {
            // check if there is a preview for each parameter value
            if (foldPreview.getPreviews().size() == numParamValues) {
                numCompleteFolds++;
                
                Preview foldParamPreview = 
                        foldPreview.getPreviews().get(paramValue);
                
                // add this Preview's standardDeviations to the overall sum
                this.addPreviewMeasurementSquaredDiffsToSum(
                        meanParamMeasurements, 
                        paramMeasurementsSquaredDiffSum,
                        foldParamPreview, 
                        numEntriesPerPreview);
            }
        }
        
        // divide sum by number of folds and take square root 
        for (int entryIdx = 0; entryIdx < numEntriesPerPreview; entryIdx++) {
            double[] sumEntry = paramMeasurementsSquaredDiffSum.get(entryIdx);
            double[] stdEntry = new double[sumEntry.length];
            
            // first measurement is used for indexing -> simply copy
            stdEntry[0] = sumEntry[0];
            
            // calculate standard deviation for remaining measurements
            for (int m = 1; m < sumEntry.length; m++) {
                if (numCompleteFolds > 1) {
                    stdEntry[m] = Math.sqrt(sumEntry[m]/(numCompleteFolds-1));
                }
                else {
                    stdEntry[m] = Math.sqrt(sumEntry[m]);
                }
            }
            
            paramMeasurementsStd.add(stdEntry);
        }
        
        return paramMeasurementsStd;
    }
private List < double [ ] > calculateStdMeasurementsForParam ( int numEntriesPerPreview , int numParamValues , int paramValue , List < double [ ] > meanParamMeasurements ) { List < double [ ] > paramMeasurementsSquaredDiffSum = new ArrayList < double [ ] > ( numEntriesPerPreview ) ; List < double [ ] > paramMeasurementsStd = new ArrayList < double [ ] > ( numEntriesPerPreview ) ; int numCompleteFolds = 0 ; for ( PreviewCollection < Preview > foldPreview : this . origMultiRunPreviews . subPreviews ) { if ( foldPreview . getPreviews ( ) . size ( ) == numParamValues ) { numCompleteFolds ++ ; Preview foldParamPreview = foldPreview . getPreviews ( ) . get ( paramValue ) ; this . addPreviewMeasurementSquaredDiffsToSum ( meanParamMeasurements , paramMeasurementsSquaredDiffSum , foldParamPreview , numEntriesPerPreview ) ; } } for ( int entryIdx = 0 ; entryIdx < numEntriesPerPreview ; entryIdx ++ ) { double [ ] sumEntry = paramMeasurementsSquaredDiffSum . get ( entryIdx ) ; double [ ] stdEntry = new double [ sumEntry . length ] ; stdEntry [ 0 ] = sumEntry [ 0 ] ; for ( int m = 1 ; m < sumEntry . length ; m ++ ) { if ( numCompleteFolds > 1 ) { stdEntry [ m ] = Math . sqrt ( sumEntry [ m ] / ( numCompleteFolds - 1 ) ) ; } else { stdEntry [ m ] = Math . sqrt ( sumEntry [ m ] ) ; } } paramMeasurementsStd . add ( stdEntry ) ; } return paramMeasurementsStd ; }
Calculate the standard deviation measurements for the given parameter
value.

@param numEntriesPerPreview
@param numParamValues
@param paramValue
@return List of standard deviation measurement arrays