提交 e17b70e5 编写于 作者: V Vadim Pisarevsky

updated documentation with the new PCA functionality

上级 93155c6a
......@@ -2240,6 +2240,8 @@ PCA constructors
.. ocv:function:: PCA::PCA(InputArray data, InputArray mean, int flags, int maxComponents=0)
.. ocv:function:: PCA::PCA(InputArray data, InputArray mean, int flags, double retainedVariance)
:param data: input samples stored as matrix rows or matrix columns.
:param mean: optional mean value; if the matrix is empty (``noArray()``), the mean is computed from the data.
......@@ -2251,8 +2253,10 @@ PCA constructors
* **CV_PCA_DATA_AS_COL** indicates that the input samples are stored as matrix columns.
:param maxComponents: maximum number of components that PCA should retain; by default, all the components are retained.
:param retainedVariance: Percentage of variance that PCA should retain. Using this parameter will let the PCA decided how many components to retain but it will always keep at least 2.
The default constructor initializes an empty PCA structure. The second constructor initializes the structure and calls
The default constructor initializes an empty PCA structure. The other constructors initialize the structure and call
:ocv:funcx:`PCA::operator()` .
......@@ -2263,6 +2267,8 @@ Performs Principal Component Analysis of the supplied dataset.
.. ocv:function:: PCA& PCA::operator()(InputArray data, InputArray mean, int flags, int maxComponents=0)
.. ocv:function:: PCA& PCA::operator()(InputArray data, InputArray mean, int flags, double retainedVariance)
.. ocv:pyfunction:: cv2.PCACompute(data[, mean[, eigenvectors[, maxComponents]]]) -> mean, eigenvectors
:param data: input samples stored as the matrix rows or as the matrix columns.
......@@ -2276,6 +2282,8 @@ Performs Principal Component Analysis of the supplied dataset.
* **CV_PCA_DATA_AS_COL** indicates that the input samples are stored as matrix columns.
:param maxComponents: maximum number of components that PCA should retain; by default, all the components are retained.
:param retainedVariance: Percentage of variance that PCA should retain. Using this parameter will let the PCA decided how many components to retain but it will always keep at least 2.
The operator performs PCA of the supplied dataset. It is safe to reuse the same PCA structure for multiple datasets. That is, if the structure has been previously used with another dataset, the existing internal data is reclaimed and the new ``eigenvalues``, ``eigenvectors`` , and ``mean`` are allocated and computed.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册