public class RobustRegressionUtility
extends java.lang.Object
Dataset that contains both measured and predicted class variables.
Uses methods outlined in a paper by Motulsky and Brown.
.| Modifier and Type | Field and Description |
|---|---|
protected double |
Q
Threshold for considering an entry an outlier.
|
protected double |
TestFraction
What fraction of the population to test
|
| Constructor and Description |
|---|
RobustRegressionUtility() |
| Modifier and Type | Method and Description |
|---|---|
double |
getRSDR(double[] errors,
double mean,
int K)
Calculate RSDR if the mean is already known.
|
double |
getRSDR(double[] errors,
int K)
Calculate the Robust Standard Deviation of Residuals.
|
boolean[] |
isOutlier(Dataset Data)
Determines which entries in a dataset qualify as an outlier.
|
boolean[] |
isOutlier(Dataset Data,
int K)
Determine which entries in a dataset qualify as an outlier, for nonlinear regression purposes.
|
void |
setQ(double q)
Define the target False Discovery Rate for outlier selection
|
void |
setTestFraction(double TestFraction)
Define the fraction of entries that will be tested as potential outliers.
|
protected double Q
protected double TestFraction
public void setQ(double q)
q - Desired Q parameter (see
Benjamini and Hochberg)public void setTestFraction(double TestFraction)
TestFraction - Fraction of entries to test.public boolean[] isOutlier(Dataset Data)
Data - Dataset to screenpublic boolean[] isOutlier(Dataset Data, int K)
Data - Dataset to screenK - Number of fitting parameters in modelpublic double getRSDR(double[] errors,
int K)
NOTE: Their method seems to assume that the mean of residuals is 0, which is likely for most functions. I remove this constraint by subtracting the mean absolute error from the error of each point. This should not change results much. Motulsky and Brown
errors - Errors for entire population (not magnitude of errors).K - Number of fitted parameters in the modelpublic double getRSDR(double[] errors,
double mean,
int K)
getRSDR(double[], int) for
more details.errors - Errors for entire population (not magnitude of errors).K - Number of fitted parameters in the modelmean - Mean error