@@ -57,11 +57,12 @@ class PCovR(_BasePCov):
5757 mixing: float, default=0.5
5858 mixing parameter, as described in PCovR as :math:`{\alpha}`, here named to avoid
5959 confusion with regularization parameter `alpha`
60+
6061 n_components : int, float or str, default=None
6162 Number of components to keep.
6263 if n_components is not set all components are kept::
63-
6464 n_components == min(n_samples, n_features)
65+
6566 svd_solver : {'auto', 'full', 'arpack', 'randomized'}, default='auto'
6667 If auto :
6768 The solver is selected by a default policy based on `X.shape` and
@@ -78,13 +79,16 @@ class PCovR(_BasePCov):
7879 min(X.shape)
7980 If randomized :
8081 run randomized SVD by the method of Halko et al.
82+
8183 tol : float, default=1e-12
8284 Tolerance for singular values computed by svd_solver == 'arpack'. Must be of
8385 range [0.0, infinity).
86+
8487 space: {'feature', 'sample', 'auto'}, default='auto'
8588 whether to compute the PCovR in `sample` or `feature` space default=`sample`
8689 when :math:`{n_{samples} < n_{features}}` and `feature` when
8790 :math:`{n_{features} < n_{samples}}`
91+
8892 regressor: {`Ridge`, `RidgeCV`, `LinearRegression`, `precomputed`}, default=None
8993 regressor for computing approximated :math:`{\mathbf{\hat{Y}}}`. The regressor
9094 should be one `sklearn.linear_model.Ridge`, `sklearn.linear_model.RidgeCV`, or
@@ -98,42 +102,52 @@ class PCovR(_BasePCov):
98102 regressed form of the targets :math:`{\mathbf{\hat{Y}}}`. If None,
99103 ``sklearn.linear_model.Ridge('alpha':1e-6, 'fit_intercept':False, 'tol':1e-12)``
100104 is used as the regressor.
105+
101106 iterated_power : int or 'auto', default='auto'
102107 Number of iterations for the power method computed by svd_solver ==
103108 'randomized'. Must be of range [0, infinity).
109+
104110 random_state : int, :class:`numpy.random.RandomState` instance or None, default=None
105111 Used when the 'arpack' or 'randomized' solvers are used. Pass an int for
106112 reproducible results across multiple function calls.
113+
107114 whiten : bool, deprecated
108115
109116 Attributes
110117 ----------
111118 mixing: float, default=0.5
112119 mixing parameter, as described in PCovR as :math:`{\alpha}`
120+
113121 tol: float, default=1e-12
114122 Tolerance for singular values computed by svd_solver == 'arpack'.
115123 Must be of range [0.0, infinity).
124+
116125 space: {'feature', 'sample', 'auto'}, default='auto'
117126 whether to compute the PCovR in `sample` or `feature` space default=`sample`
118127 when :math:`{n_{samples} < n_{features}}` and `feature` when
119128 :math:`{n_{features} < n_{samples}}`
129+
120130 n_components_ : int
121131 The estimated number of components, which equals the parameter n_components, or
122132 the lesser value of n_features and n_samples if n_components is None.
133+
123134 pxt_ : numpy.ndarray of size :math:`({n_{samples}, n_{components}})`
124135 the projector, or weights, from the input space :math:`\mathbf{X}` to the
125136 latent-space projection :math:`\mathbf{T}`
137+
126138 pty_ : numpy.ndarray of size :math:`({n_{components}, n_{properties}})`
127139 the projector, or weights, from the latent-space projection :math:`\mathbf{T}`
128140 to the properties :math:`\mathbf{Y}`
141+
129142 pxy_ : numpy.ndarray of size :math:`({n_{samples}, n_{properties}})`
130143 the projector, or weights, from the input space :math:`\mathbf{X}` to the
131144 properties :math:`\mathbf{Y}`
145+
132146 explained_variance_ : numpy.ndarray of shape (n_components,)
133147 The amount of variance explained by each of the selected components.
134-
135148 Equal to n_components largest eigenvalues
136149 of the PCovR-modified covariance matrix of :math:`\mathbf{X}`.
150+
137151 singular_values_ : numpy.ndarray of shape (n_components,)
138152 The singular values corresponding to each of the selected components.
139153
@@ -195,6 +209,7 @@ def fit(self, X, Y, W=None):
195209 means and scaled. If features are related, the matrix should be scaled
196210 to have unit variance, otherwise :math:`\mathbf{X}` should be
197211 scaled so that each feature has a variance of 1 / n_features.
212+
198213 Y : numpy.ndarray, shape (n_samples, n_properties)
199214 Training data, where n_samples is the number of samples and n_properties is
200215 the number of properties
@@ -206,6 +221,7 @@ def fit(self, X, Y, W=None):
206221
207222 If the passed regressor = `precomputed`, it is assumed that Y is the
208223 regressed form of the properties, :math:`{\mathbf{\hat{Y}}}`.
224+
209225 W : numpy.ndarray, shape (n_features, n_properties)
210226 Regression weights, optional when regressor=`precomputed`. If not
211227 passed, it is assumed that `W = np.linalg.lstsq(X, Y, self.tol)[0]`
0 commit comments