Principal Component Analysis. (Computes the principal components about the mean of the data when you call train. The transformed (reduced-dimensional) data will have a mean about the origin.)
|
| GPCA (size_t targetDims) |
|
| GPCA (const GDomNode *pNode) |
| Load from a DOM. More...
|
|
virtual | ~GPCA () |
|
void | aboutOrigin () |
| Specify to compute the principal components about the origin (instead of computing them about the mean). More...
|
|
GMatrix * | basis () |
| Returns the matrix of basis vectors. Row 0 is the first principal component, row 1 is the second principal component, and so forth. More...
|
|
GVec & | centroid () |
| Returns the centroid about which the principal components were calculated. More...
|
|
GMatrix * | components () |
| Returns a dataset where the first row is the centroid, and the remaining rows are the principal component vectors in order of decreasing eigenvalue. More...
|
|
void | computeEigVals () |
| Specify to compute the eigenvalues during training. This method must be called before train is called. More...
|
|
GVec & | eigVals () |
| Returns the eigenvalues. Returns NULL if computeEigVals was not called. More...
|
|
GRand & | rand () |
| Returns a reference to the pseudo-random number generator used by this object. More...
|
|
virtual GDomNode * | serialize (GDom *pDoc) const |
| Marshal this object into a DOM, which can then be converted to a variety of serial formats. More...
|
|
size_t | targetDims () |
| Returns the number of principal components that it will find. More...
|
|
virtual void | transform (const GVec &in, GVec &out) |
| See the comment for GIncrementalTransform::transform. Projects the specified point into fewer dimensions. More...
|
|
virtual void | untransform (const GVec &in, GVec &out) |
| Computes a (lossy) high-dimensional point that corresponds with the specified low-dimensional coordinates. More...
|
|
virtual void | untransformToDistribution (const GVec &in, GPrediction *pOut) |
| See the comment for GIncrementalTransform::untransformToDistribution. More...
|
|
| GIncrementalTransform () |
|
| GIncrementalTransform (const GDomNode *pNode) |
|
virtual | ~GIncrementalTransform () |
|
const GRelation & | after () const |
| Returns a relation object describing the data after it is transformed. More...
|
|
const GRelation & | before () const |
| Returns a relation object describing the data before it is transformed. More...
|
|
GVec & | innerBuf () |
| Returns a buffer of sufficient size to store an inner (transformed) vector. The caller should not to delete the buffer. The same buffer will be returned each time. More...
|
|
virtual GMatrix * | reduce (const GMatrix &in) |
| This calls train, then calls transformBatch, and returns the result. More...
|
|
void | setAfter (GRelation *pRel) |
| Sets the after relation. Takes ownership of pRel. More...
|
|
void | setBefore (GRelation *pRel) |
| Sets the before relation. Takes ownership of pRel. More...
|
|
void | train (const GMatrix &data) |
| Trains the transform on the data in pData. (This method may be a no-op for transformations that always behave in the same manner.) More...
|
|
void | train (const GRelation &pRelation) |
| "Trains" the transform without any data. More...
|
|
virtual GMatrix * | transformBatch (const GMatrix &in) |
| This assumes that train has already been called, and transforms all the rows in in returning the resulting matrix. The caller is responsible for deleting the new matrix. More...
|
|
virtual std::unique_ptr< GMatrix > | untransformBatch (const GMatrix &in) |
| This assumes train was previously called, and untransforms all the rows in pIn and returns the results. More...
|
|
| GTransform () |
|
| GTransform (const GDomNode *pNode) |
|
virtual | ~GTransform () |
|