From 72c6da1b694a9ae0f976cbfc1abe4bd5192c8647 Mon Sep 17 00:00:00 2001 From: Yue Zhao Date: Thu, 7 Jun 2018 13:01:54 -0400 Subject: [PATCH] Improve documentation --- pyod/models/pca.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pyod/models/pca.py b/pyod/models/pca.py index f301d3b5..4cd1c8b8 100644 --- a/pyod/models/pca.py +++ b/pyod/models/pca.py @@ -40,7 +40,7 @@ class PCA(BaseDetector): Score(X) = Sum of eigenvectors j in {1,d} |X-e_{j}|/eigenvalues - :param n_components: Number of princinpal components to keep. + :param n_components: Number of principal components to keep. if n_components is not set all components are kept:: n_components == min(n_samples, n_features) @@ -53,8 +53,11 @@ class PCA(BaseDetector): n_components cannot be equal to n_features for svd_solver == 'arpack'. :type n_components: int, float, None or str - :param n_selected_components: - :type n_selected_components: + :param n_selected_components: Number of selected principal components + for calculating the outlier scores. It is not necessarily equal to + the total number of the principal components. If not set, use + all principal components. + :type n_selected_components: int, optional (default=None) :param contamination: The amount of contamination of the data set, i.e. the proportion of outliers in the data set. Used when fitting to