|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.tensor.AutoRegressor
public class AutoRegressor
Class to implement auto regression, not completed
| Field Summary | |
|---|---|
static int |
AR_BEST
Best AR |
static int |
AR_MEAN
Mean AR |
static int |
AR_ZERO
Zero mean AR |
| Constructor Summary | |
|---|---|
AutoRegressor()
|
|
AutoRegressor(java.util.LinkedList<java.util.LinkedList<double[]>> data,
int windowSize,
int arConstant)
Method to calculate the regression coefficients |
|
| Method Summary | |
|---|---|
static void |
add(double[] dest,
double[] src,
double weight)
Add a weighted amount of src to dest |
static double |
dotProduct(double[] a,
double[] b)
Dot product between two vectors |
double[] |
predict(java.util.LinkedList<double[]> previous)
Predict method |
void |
read(java.io.InputStream dis)
Read from an InputStream |
boolean |
read(java.io.StreamTokenizer st)
Read auto regression data |
java.util.LinkedList<double[]> |
test(java.util.LinkedList<double[]> original)
Test method -finds the difference between the prediction and actual for each frame |
java.util.LinkedList<double[]> |
transform(java.util.LinkedList<double[]> original,
AutoRegressor targetAr)
Transform method |
void |
write(java.io.PrintStream ps)
Write to a PrintStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int AR_ZERO
public static final int AR_MEAN
public static final int AR_BEST
| Constructor Detail |
|---|
public AutoRegressor()
public AutoRegressor(java.util.LinkedList<java.util.LinkedList<double[]>> data,
int windowSize,
int arConstant)
data - The list of data vectors in orderwindowSize - The size of the window to use in the regressionarConstant - indicates whether to use zero, the mean or the best constant vector| Method Detail |
|---|
public void write(java.io.PrintStream ps)
ps - the PrintStream to write topublic void read(java.io.InputStream dis)
dis - the InputStream to read frompublic boolean read(java.io.StreamTokenizer st)
st - the StreamTokenizer to read from
public static double dotProduct(double[] a,
double[] b)
a - the first vectorb - the second vector
public static void add(double[] dest,
double[] src,
double weight)
dest - the dest vectorsrc - the src vectorweight - the amount of src to add to destpublic double[] predict(java.util.LinkedList<double[]> previous)
previous - set of vectors
public java.util.LinkedList<double[]> transform(java.util.LinkedList<double[]> original,
AutoRegressor targetAr)
original - the original vectortargetAr - the auto regression
public java.util.LinkedList<double[]> test(java.util.LinkedList<double[]> original)
original - the original vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||