# source:orange/docs/reference/rst/Orange.projection.pca.rst@9994:1073e0304a87

Revision 9994:1073e0304a87, 1.8 KB checked in by Matija Polajnar <matija.polajnar@…>, 2 years ago (diff)

Remove links from documentation to datasets. Remove datasets reference directory.

Line
1.. index:: Pricipal Component Analysis
2
3.. index::
4   single: projection, Principal Component Analysis
5
6*************************************
7Pricipal Component Analysis (``pca``)
8*************************************
9
10An implementation of `principal component analysis <http://en.wikipedia.org/wiki/Principal_component_analysis>`_.
11PCA uses an orthogonal transformation to transform input features into a set of uncorrelated features called principal
12components. This transformation is defined in such a way that the first principal component has as high variance as
13possible and each succeeding component in turn has the highest variance possible under constraint that is be orthogonal
14to the preceding components.
15
16Because PCA is sensitive to the relative scaling of the original variables the default behaviour of PCA class is to
17standardize the input data.
18
19Learner and Classifier
20======================
21
22.. index:: PCA
23.. autoclass:: Orange.projection.pca.Pca
24   :members:
25
26.. autoclass:: Orange.projection.pca.PcaClassifier
27   :members:
28
29Examples
30========
31
32The following example demonstrates a straightforward invocation of PCA
34
35.. literalinclude:: code/pca-run.py
36   :lines: 7-
37
38The call to the Pca constructor returns an instance of PcaClassifier, which is later used to transform data to PCA
39feature space. Printing the classifier displays how much variance is covered with the first few components. Classifier
40can also be used to access transformation vectors (eigen_vectors) and variance of the pca components (eigen_values).
41Scree plot can be used when deciding, how many components to keep (:download:`pca-scree.py <code/pca-scree.py>`):
42
43.. literalinclude:: code/pca-scree.py
44   :lines: 7-
45
46.. image:: files/pca-scree.png
47   :scale: 50 %
Note: See TracBrowser for help on using the repository browser.