| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.pga.SpherePGA
public class SpherePGA
Principal Geodesic Analysis for hyperspherical data (Experimental, only part completed)
| Constructor Summary | |
|---|---|
SpherePGA(java.util.Vector<double[]> data,
          double tol)
Creates a new instance of SpherePGA  | 
|
| Method Summary | |
|---|---|
static void | 
addToAverage(double[] average,
             double[] b,
             int n)
Add an (unfolded) sample to the average  | 
 void | 
addToAverage(double[] v,
             int n)
Adds a sample to the average  | 
 double[] | 
analyse(double[] v)
Analyse the vector given this model  | 
 void | 
calculateMean(java.util.Vector<double[]> data)
Estimate the mean  | 
 void | 
estimateMean(java.util.Vector<double[]> data,
             double tol)
Estimate the mean of the dataset on the hypersphere  | 
 double[] | 
fold(double[] v)
Folds the sample back into the sphere  | 
 double[] | 
getMean()
Return the current estimate of the mean  | 
static double | 
length(double[] vec)
Returns the length of the vector  | 
static void | 
main(java.lang.String[] args)
The main method is used for testing  | 
static void | 
normalise(double[] vec)
Subtract the mean of the vector's coords and normlise length to 1  | 
 double[] | 
reconstruct(double[] v)
Reconstruct using this model  | 
 double[] | 
unfold(double[] v)
Unfolds a sample into the tangent plane  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public SpherePGA(java.util.Vector<double[]> data,
                 double tol)
data - the data vectors to build the SpherePGA fromtol - tolerence factor for intrinsic mean convergence| Method Detail | 
|---|
public double[] analyse(double[] v)
v - the vector to analyse
public double[] reconstruct(double[] v)
v - the parameter vector
public void calculateMean(java.util.Vector<double[]> data)
data - The data to use to estimate the mean
public void estimateMean(java.util.Vector<double[]> data,
                         double tol)
data - the data samplestol - the tolerance, a change in the mean below this halts the iterationpublic double[] getMean()
public static void addToAverage(double[] average,
                                double[] b,
                                int n)
average - the (unfolded) average to add tob - the vector to addn - the number currently in the averagepublic double[] unfold(double[] v)
v - the sample to unfold
public double[] fold(double[] v)
v - the (flattened) vector to fold
public static double length(double[] vec)
vec - the vector to normalise
public void addToAverage(double[] v,
                         int n)
v - the sample to addn - the number of samples previously added to the meanpublic static void normalise(double[] vec)
vec - the vector to normalisepublic static void main(java.lang.String[] args)
args - 
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||