|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectpamMaths.Regressions
public class Regressions
Class for performing various regressions. Relies heavily on the Matrixes and other utilities in the JAMA package. Developers must download JAMA and install the jar file into their JAVA path.
see http://math.nist.gov/javanumerics/jama/
| Constructor Summary | |
|---|---|
Regressions()
|
|
| Method Summary | |
|---|---|
private static double[] |
anyOrderFit(double[] x,
double[] y,
int order)
Fit a polynomial of any order |
static double |
getMean(double[] y)
Get the mean of a set of values |
static double[] |
linFit(double[] x,
double[] y)
Fit a linear regression line to a set of points |
static double[] |
meanFit(double[] y)
Return the mean of a set of points as a one element array for compatibility with other, higher order fits. |
static double[] |
polyFit(double[] x,
double[] y,
int order)
|
static double[] |
squareFit(double[] x,
double[] y)
Fit a second order polynomial to a set of points |
static double |
value(double[] fitParams,
double x)
Use the parameters of the fit to calculate a value using the fitParams polynomial. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Regressions()
| Method Detail |
|---|
public static double[] polyFit(double[] x,
double[] y,
int order)
public static double[] meanFit(double[] y)
y - array ofvalues
public static double getMean(double[] y)
y - array ofvalues
public static double[] linFit(double[] x,
double[] y)
x - array of x coordinatesy - array of y coordinates
public static double[] squareFit(double[] x,
double[] y)
x - array of x coordinatesy - array of y coordinates
private static double[] anyOrderFit(double[] x,
double[] y,
int order)
x - set of x coordinatesy - set of y coordinatesorder - order of the fit
public static double value(double[] fitParams,
double x)
fitParams - parameters of the fitx - x value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||