public class Simpleregression
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
double |
bestMedian
best median
|
Simpleregression |
bestRegression
best regression as established by the robust regression
|
Simpleregression |
cleanedRegression
best regression without outliers
|
double |
intercept
regression intercept
|
java.util.List<java.lang.Double> |
list2regress
regressand
|
double |
means_square_error
sum of squared errors divided by the degrees of freedom, usually abbreviated MSE
|
double |
R
Pearson's product moment correlation coefficient usually denoted r
|
double |
RSquare
coefficient of determination, usually denoted r-square
|
double |
significance
significance level of the slope (equiv) correlation
|
org.apache.commons.math3.stat.regression.SimpleRegression |
simpleRegression
simple regression
|
double |
slope
regression slope
|
double |
slope_standard_error
regression standard error
|
double |
slopeConfidenceInterval
Returns the half-width of a 95% confidence interval for the slope estimate.
|
double |
slopeStdErr
standard error of the slope estimate, usually denoted s(b1).
|
double |
sumOfCrossProducts
Returns the sum of crossproducts, xi*yi.
|
double |
sumSquaredErrors
sum of squared errors (SSE)
|
double |
sumSquarre
sum of squared deviations of the predicted y values about their mean (which equals the mean of y)
|
double |
totalSumSquares
sum of squared deviations of the y values about their mean
|
double |
xSumSquares
sum of squared deviations of the x values about their mean.
|
Constructor and Description |
---|
Simpleregression(FileManager localFile,
FileManager remoteFile)
consider only simple regression to populate the regression with the two provided files
|
Simpleregression(java.util.List<java.lang.Double> alist2regress)
instanciate a simple regression using the samples provided in the list
|
Modifier and Type | Method and Description |
---|---|
void |
buildRLSRegression()
Builds a new LinearRegression without the 'bad' data found by buildWeight
|
static int |
combinations(int n,
int r)
number of combinaision of r elements among n elements
|
void |
findBestRegression()
determine the best regression using robust regression
|
double |
getMedian()
return the median
|
double |
getMyMedian(java.util.List<java.lang.Double> list)
return the median
|
long |
getRandomSeed()
get the seed for the random number generator
|
java.util.List<java.lang.Double> |
getSubSample(int sampleSize)
Produces a random sample from m_Data in m_SubSample
|
void |
setRandomSeed(long randomseed)
Set the seed for the random number generator
|
public org.apache.commons.math3.stat.regression.SimpleRegression simpleRegression
public double intercept
public double slope
public double slope_standard_error
public double means_square_error
public double R
public double sumSquarre
public double RSquare
public double significance
public double slopeConfidenceInterval
public double slopeStdErr
public double sumOfCrossProducts
public double sumSquaredErrors
public double totalSumSquares
public double xSumSquares
public java.util.List<java.lang.Double> list2regress
public double bestMedian
public Simpleregression bestRegression
public Simpleregression cleanedRegression
public Simpleregression(java.util.List<java.lang.Double> alist2regress)
alist2regress
- public Simpleregression(FileManager localFile, FileManager remoteFile)
localFile
- file storing the sound recorded locallyremoteFile
- file sroting the sound given by the remote devicepublic double getMedian()
public double getMyMedian(java.util.List<java.lang.Double> list)
list
- measurementspublic void findBestRegression()
public static int combinations(int n, int r)
n
- total amount of elementsr
- amount of some subelementspublic void buildRLSRegression()
public void setRandomSeed(long randomseed)
randomseed
- the seedpublic long getRandomSeed()
public java.util.List<java.lang.Double> getSubSample(int sampleSize)
sampleSize
- size of the sample to extract