IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Represents a principal component analysis. More...
Public Member Functions | |
int | MinimumDimension (double P) |
Gets the minimum number of principal components that must be included to explain the given fraction of the total variance. More... | |
PrincipalComponent | Component (int componentIndex) |
Gets the requested principal component. More... | |
MultivariateSample | TransformedSample () |
Represents the original data in terms of principal components. More... | |
Properties | |
int | Dimension [get] |
Gets the number of components. More... | |
int | Count [get] |
Gets the number of data entries. More... | |
Private Attributes | |
int | cols |
double[] | wStore |
double[] | vStore |
Represents a principal component analysis.
Principal component analysis (PCA) is a form of factor analysis. It attempts to identify a small number number of factors such that, by specifing only values of these few factors for each row, the value of each variable can be accurately predicted.
Mathematically, PCA constructs an alternative set of orthonormal basis vectors for a multi-variate data set. These basis vectors, called principal components, are ordered by the total variance explained by each.
Suppose, for example, you measure the value of different possessions possessions for a sample of people: home value, car value, furniture value, etc. You might expect that much of the variation in these numbers can be explained by one underlying factor, which you might call "richness". If this is true, then a PCA analysis will show that the most principal component explains a very large faction of the total variance, and the other less principal components will explain only small fractions of the total variance.
Note that PCA is not invariant with respect to the re-scaling of individual variables.
Note that PCA is an exploratory technique, not a hypothesis test.
|
inline |
Gets the minimum number of principal components that must be included to explain the given fraction of the total variance.
P | The fraction of the variance to explain, which must lie between zero and one. |
|
inline |
Gets the requested principal component.
componentIndex | The (zero-based) index of the principal component. |
Principal components are ordered by strength. The most principal component, i.e. the component which explains the most variance, has index zero. The least principal component has the highest index.
ArgumentOutOfRangeException | componentIndex lies outside the range [0, Dimension-1]. |
Referenced by Test.RectangularMatrixTest.PC(), and Test.MultivariateSampleTest.PrincipalComponentAnalysis().
|
inline |
Represents the original data in terms of principal components.
References Meta.Numerics.Statistics.MultivariateSample.Add().
Referenced by Test.RectangularMatrixTest.PC(), and Test.MultivariateSampleTest.PrincipalComponentAnalysis().
|
private |
|
private |
Referenced by Meta.Numerics.Statistics.PrincipalComponent.ScaledVector().
|
private |
|
get |
Gets the number of components.
The number of components is equal to the number of variables used in the analysis.
Referenced by Test.RectangularMatrixTest.PC(), and Test.MultivariateSampleTest.PrincipalComponentAnalysis().
|
get |
Gets the number of data entries.
Referenced by Test.RectangularMatrixTest.PC(), and Test.MultivariateSampleTest.PrincipalComponentAnalysis().