Package flanagan.analysis

Examples of flanagan.analysis.Regression


                     // overdetermined equations - least squares used - must be used with care
                     int n = bvec.length;
                     if(this.numberOfRows!=n)throw new IllegalArgumentException("Overdetermined equation solution - vector length is not equal to matrix column length");
                     Matrix avecT = this.transpose();
                     double[][] avec = avecT.getArrayCopy();
                     Regression reg = new Regression(avec, bvec);
                    reg.linearGeneral();
                    xvec = reg.getCoeff();
                 }
                 else{
                     throw new IllegalArgumentException("This class does not handle underdetermined equations");
                 }
             }
View Full Code Here


           
            xArray[i] = (resultFileSize / factor) * 100.0;
            yArray[i] = ((INumericValue)elapsedTimeMeasurements.getList().get(i).getValue()).value();
        }
       
        Regression reg = new Regression(xArray, yArray);
        reg.linear();
        double[] bestEstimates = reg.getBestEstimates();
       
        // y = k*x + d
        // y = bestEstimate[1]*x + bestEstimate[0]
        double startUpTime = bestEstimates[0];

View Full Code Here

        am = new ArrayMaths(yTransform);
        am = am.sort();
        yTransform = am.array();

        // Calculate and return probability plot correlation coefficient
        reg = new Regression(gaussianOrderMedians, yTransform);
        reg.linear();
        return reg.getSampleR();

    }
View Full Code Here

        // Calculate Gaussian N[0,1] order statistic medians
        this.gaussianOrderMedians = Stat.gaussianOrderStatisticMedians(this.nData);

        // calculate the correlation coefficient of the probability plot for the untransformed data
        Regression reg = new Regression(this.gaussianOrderMedians, ((new ArrayMaths(this.standardizedOriginalData)).sort().array()));
        reg.linear();
        this.originalSampleR = reg.getSampleR();
        double[] coeff = reg.getBestEstimates();
        this.originalIntercept = coeff[0];
        this.originalGradient = coeff[1];
    }
View Full Code Here

        // Obtain the intercept and gradient of the Gaussian probabilty plot
        Stat st4 = new Stat(this.standardizedTransformedData);
        st4 = st4.sort();
        double[] ordered = st4.array();
        Regression reg = new Regression(this.gaussianOrderMedians, ordered);
        reg.linear();
        coeff = reg.getBestEstimates();
        this.transformedIntercept = coeff[0];
        this.transformedGradient = coeff[1];

        // Adust mean and standard deviation of the transformed data to match those of the entered data
        this.scaledTransformedData = Stat.scale(this.standardizedTransformedData, this.originalMean, this.originalStandardDeviation);
View Full Code Here

            xArray[i] = (resultFileSize / factor) * 100.0;
            yArray[i] = ((INumericValue) elapsedTimeMeasurements.getList().get(i).getValue()).value();
        }

        Regression reg = new Regression(xArray, yArray);
        reg.linear();
        double[] bestEstimates = reg.getBestEstimates();

        // y = k*x + d
        // y = bestEstimate[1]*x + bestEstimate[0]
        double startUpTime = bestEstimates[0];

View Full Code Here

TOP

Related Classes of flanagan.analysis.Regression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.