mPCA.c File Reference

#include <stdio.h>
#include <math.h>
#include <AR/matrix.h>
Include dependency graph for mPCA.c:

Go to the source code of this file.

Defines

#define EPS   1e-6
#define MAX_ITER   100
#define VZERO   1e-16
#define xmalloc(V, T, S)

Functions

int arMatrixPCA (ARMat *input, ARMat *evec, ARVec *ev, ARVec *mean)
 compute the PCA of a matrix.
int arMatrixPCA2 (ARMat *input, ARMat *evec, ARVec *ev)
 compute the PCA of a matrix.
static int CENTER (ARMat *inout, ARVec *mean)
static int EV_create (ARMat *input, ARMat *u, ARMat *output, ARVec *ev)
static int EX (ARMat *input, ARVec *mean)
static int PCA (ARMat *input, ARMat *output, ARVec *ev)
static int QRM (ARMat *u, ARVec *ev)
static int x_by_xt (ARMat *input, ARMat *output)
static int xt_by_x (ARMat *input, ARMat *output)

Define Documentation

#define EPS   1e-6

Definition at line 6 of file mPCA.c.

#define MAX_ITER   100

Definition at line 7 of file mPCA.c.

#define VZERO   1e-16

Definition at line 5 of file mPCA.c.

#define xmalloc ( V,
T,
 ) 
Value:
{ if( ((V) = (T *)malloc( sizeof(T) * (S) ))\
                               == NULL ) {printf("malloc error\n"); exit(1);} }

Definition at line 8 of file mPCA.c.


Function Documentation

int arMatrixPCA ( ARMat input,
ARMat evec,
ARVec ev,
ARVec mean 
)

compute the PCA of a matrix.

Compute the Principal Component Analysis (PCA) of a matrix.

Parameters:
input source matrix
evec eigen vector computed
ev eigen value computed
mean mean computed
Returns:
0 if success to compute, -1 otherwise

Definition at line 49 of file mPCA.c.

int arMatrixPCA2 ( ARMat input,
ARMat evec,
ARVec ev 
)

compute the PCA of a matrix.

Compute the Principal Component Analysis (PCA) of a matrix.

Parameters:
input source matrix
evec result matrix
ev egein value computed
Returns:
0 if success to compute, -1 otherwise

Definition at line 89 of file mPCA.c.

static int CENTER ( ARMat inout,
ARVec mean 
) [static]

Definition at line 197 of file mPCA.c.

static int EV_create ( ARMat input,
ARMat u,
ARMat output,
ARVec ev 
) [static]

Definition at line 280 of file mPCA.c.

static int EX ( ARMat input,
ARVec mean 
) [static]

Definition at line 173 of file mPCA.c.

static int PCA ( ARMat input,
ARMat output,
ARVec ev 
) [static]

Definition at line 123 of file mPCA.c.

static int QRM ( ARMat u,
ARVec ev 
) [static]

Definition at line 318 of file mPCA.c.

static int x_by_xt ( ARMat input,
ARMat output 
) [static]

Definition at line 216 of file mPCA.c.

static int xt_by_x ( ARMat input,
ARMat output 
) [static]

Definition at line 247 of file mPCA.c.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines


artoolkit
Author(s): Gautier Dumonteil
autogenerated on Fri Jan 11 10:05:48 2013